Work around unicode/str issue in pytz
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
65e965c8f7
commit
0c6ee81eb4
@ -55,7 +55,9 @@ def clock(request):
|
||||
now = datetime.datetime.now()
|
||||
utc_now = datetime.datetime.utcnow().replace(tzinfo=pytz.utc)
|
||||
for dev in devs:
|
||||
tz = pytz.timezone(dev.userprofile.time_zone)
|
||||
# Work around https://bugs.launchpad.net/pytz/+bug/718673
|
||||
timezone = str(dev.userprofile.time_zone)
|
||||
tz = pytz.timezone(timezone)
|
||||
dev.current_time = utc_now.astimezone(tz)
|
||||
|
||||
page_dict = {
|
||||
|
Loading…
Reference in New Issue
Block a user