summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-03-08 04:06:04 +0100
committerDan McGee <dan@archlinux.org>2011-03-08 04:06:04 +0100
commit0c6ee81eb469734dae380f428149f316fdbf75bd (patch)
tree8c2b2a6ab32d0ae4db7065f5d08f3ecfd4e2889f /devel
parent65e965c8f76677904f5d98965e13bf89726247d4 (diff)
downloadarchweb-0c6ee81eb469734dae380f428149f316fdbf75bd.tar.gz
archweb-0c6ee81eb469734dae380f428149f316fdbf75bd.tar.xz
Work around unicode/str issue in pytz
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/views.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/devel/views.py b/devel/views.py
index 311922c..c926c5a 100644
--- a/devel/views.py
+++ b/devel/views.py
@@ -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 = {