Browse files

unicode: Fixed an encoding problem that was showing up on non-English…

… versions

of Windows (where timezone strings are different to POSIX systems).

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
malcolmt committed Jun 25, 2007
1 parent 0ced8b0 commit 9c5994743c16fba36ead6811973e99e1e742dd8a
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/utils/
@@ -2,6 +2,7 @@
import time
from datetime import timedelta, tzinfo
+from django.utils.encoding import smart_unicode
class FixedOffset(tzinfo):
"Fixed offset in minutes east from UTC."
@@ -25,7 +26,7 @@ class LocalTimezone(tzinfo):
"Proxy timezone information from time module."
def __init__(self, dt):
tzinfo.__init__(self, dt)
- self._tzname = unicode(time.tzname[self._isdst(dt)])
+ self._tzname = smart_unicode(time.tzname[self._isdst(dt)])
def __repr__(self):
return self._tzname

0 comments on commit 9c59947

Please sign in to comment.