diff options
author | Dan McGee <dan@archlinux.org> | 2011-03-07 21:06:04 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-03-07 21:06:04 -0600 |
commit | 0c6ee81eb469734dae380f428149f316fdbf75bd (patch) | |
tree | 8c2b2a6ab32d0ae4db7065f5d08f3ecfd4e2889f | |
parent | 65e965c8f76677904f5d98965e13bf89726247d4 (diff) |
Work around unicode/str issue in pytz
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r-- | devel/views.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/devel/views.py b/devel/views.py index 311922ca..c926c5a4 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 = { |