Call time.tzset (if available) just before calculating possible timezones from time.tzname.
This commit is contained in:
parent
ac6df95d07
commit
abe8eb0a30
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue