[py3] Ported django.utils.tzinfo.

This commit is contained in:
Aymeric Augustin 2012-08-04 11:24:30 +02:00
parent 9e8df02d68
commit 64e2e35627
1 changed files with 2 additions and 2 deletions

View File

@ -5,7 +5,7 @@ from __future__ import unicode_literals
import time import time
from datetime import timedelta, tzinfo from datetime import timedelta, tzinfo
from django.utils.encoding import smart_text, smart_bytes, DEFAULT_LOCALE_ENCODING from django.utils.encoding import smart_text, smart_str, DEFAULT_LOCALE_ENCODING
# Python's doc say: "A tzinfo subclass must have an __init__() method that can # Python's doc say: "A tzinfo subclass must have an __init__() method that can
# be called with no arguments". FixedOffset and LocalTimezone don't honor this # be called with no arguments". FixedOffset and LocalTimezone don't honor this
@ -53,7 +53,7 @@ class LocalTimezone(tzinfo):
self._tzname = self.tzname(dt) self._tzname = self.tzname(dt)
def __repr__(self): def __repr__(self):
return smart_bytes(self._tzname) return smart_str(self._tzname)
def __getinitargs__(self): def __getinitargs__(self):
return self.__dt, return self.__dt,