Skip to content

Commit fae0ac5

Browse files
author
Stuart Bishop
committed
BaseTzInfo now the base class of UTC
All timezones now share a common base class, simplifying writing pytz aware code. Addresses lp:1696956
1 parent b7b8e45 commit fae0ac5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pytz/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from pytz.exceptions import NonExistentTimeError
1818
from pytz.exceptions import UnknownTimeZoneError
1919
from pytz.lazy import LazyDict, LazyList, LazySet
20-
from pytz.tzinfo import unpickler
20+
from pytz.tzinfo import unpickler, BaseTzInfo
2121
from pytz.tzfile import build_tzinfo
2222

2323

@@ -188,7 +188,7 @@ def _unmunge_zone(zone):
188188
HOUR = datetime.timedelta(hours=1)
189189

190190

191-
class UTC(datetime.tzinfo):
191+
class UTC(BaseTzInfo):
192192
"""UTC
193193
194194
Optimized UTC implementation. It unpickles using the single module global

0 commit comments

Comments
 (0)