Commits

Anonymous committed 1b6b4ae

unicode: Fixed an encoding problem that was showing up on non-English versions
of Windows (where timezone strings are different to POSIX systems).

  • Participants
  • Parent commits 71c64ef
  • Branches unicode

Comments (0)

Files changed (1)

django/utils/tzinfo.py

 
 import time
 from datetime import timedelta, tzinfo
+from django.utils.encoding import smart_unicode
 
 class FixedOffset(tzinfo):
     "Fixed offset in minutes east from UTC."
     "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