Kaydet (Commit) abe8eb0a authored tarafından Brett Cannon's avatar Brett Cannon

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

üst ac6df95d
...@@ -284,6 +284,10 @@ class LocaleTime(object): ...@@ -284,6 +284,10 @@ class LocaleTime(object):
# Set self.__timezone by using time.tzname. # Set self.__timezone by using time.tzname.
# #
# Empty string used for matching when timezone is not used/needed. # Empty string used for matching when timezone is not used/needed.
try:
time.tzset()
except AttributeError:
pass
time_zones = ["UTC", "GMT"] time_zones = ["UTC", "GMT"]
if time.daylight: if time.daylight:
time_zones.extend(time.tzname) 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