Eryk Sun <eryk...@gmail.com> added the comment:

The solution for bpo-36779 changed init_timezone() to get tzname directly from 
WinAPI GetTimeZoneInformation(). 

Unfortunately the implementer didn't think to also support time.tzset(), so the 
value may be stale with no way to refresh it, or possibly different from what 
time.strftime('%Z') returns, depending on when ucrt looks up the timezone. For 
example, start Python and import time. Then change the time zone and call 
time.strftime('%Z'). The value will be different from time.tzname.

----------
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> time.tzname returns empty string on Windows if default codepage 
is a Unicode codepage

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue16322>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to