Commit abe8eb0a authored by Brett Cannon's avatar Brett Cannon

Call time.tzset (if available) just before calculating possible timezones from time.tzname.

parent ac6df95d
......@@ -284,6 +284,10 @@ class LocaleTime(object):
# Set self.__timezone by using time.tzname.
#
# Empty string used for matching when timezone is not used/needed.
try:
time.tzset()
except AttributeError:
pass
time_zones = ["UTC", "GMT"]
if time.daylight:
time_zones.extend(time.tzname)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment