homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients belopolsky, pitrou, serhiy.storchaka
Date 2015年12月03日.21:40:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1449178804.41.0.83393373991.issue22067@psf.upfronthosting.co.za>
In-reply-to
Content
If call time.localtime() with time before 1990年03月25日T03:00, EET is turned to MSK. I guess this is a time when the Europe/Kiev timezone was introduced.
>>> import os, time
>>> os.environ['TZ'] = 'Europe/Kiev'
>>> time.tzset()
>>> time.localtime(638319599)
time.struct_time(tm_year=1990, tm_mon=3, tm_mday=25, tm_hour=1, tm_min=59, tm_sec=59, tm_wday=6, tm_yday=84, tm_isdst=0)
>>> time.strftime('%Z', time.gmtime())
'MSK'
>>> time.localtime(638319600)
time.struct_time(tm_year=1990, tm_mon=3, tm_mday=25, tm_hour=3, tm_min=0, tm_sec=0, tm_wday=6, tm_yday=84, tm_isdst=1)
>>> time.strftime('%Z', time.gmtime())
'EET'
C function localtime() implicitly calls tzset() and sets global C variables tzname, timezone, and daylight, but these changes are not exposed as variables in the time module. C and Python ideas about timezone becomes different. This looks as a bug in time.localtime() and other functions that implicitly change timezone variables.
History
Date User Action Args
2015年12月03日 21:40:04serhiy.storchakasetrecipients: + serhiy.storchaka, belopolsky, pitrou
2015年12月03日 21:40:04serhiy.storchakasetmessageid: <1449178804.41.0.83393373991.issue22067@psf.upfronthosting.co.za>
2015年12月03日 21:40:04serhiy.storchakalinkissue22067 messages
2015年12月03日 21:40:03serhiy.storchakacreate

AltStyle によって変換されたページ (->オリジナル) /