mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
13 lines
389 B
Python
13 lines
389 B
Python
![]() |
from datetime import datetime
|
||
|
|
||
|
import pytz
|
||
|
|
||
|
|
||
|
|
||
|
ALL_TIMEZONE_CHOICES = tuple(zip(pytz.all_timezones, pytz.all_timezones))
|
||
|
COMMON_TIMEZONE_CHOICES = tuple(zip(pytz.common_timezones, pytz.common_timezones))
|
||
|
PRETTY_TIMEZONE_CHOICES = []
|
||
|
|
||
|
for tz in pytz.common_timezones:
|
||
|
now = datetime.now(pytz.timezone(tz))
|
||
|
PRETTY_TIMEZONE_CHOICES.append((tz, "(GMT%s) %s" % (now.strftime("%z"), tz)))
|