Eryk Sun <[email protected]> added the comment:
Update since msg243660:
Python 3.8+ now calls setlocale(LC_CTYPE, "") at startup in Windows, as it has
always done in POSIX, so decoding the output of strftime("%Z") with
PyUnicode_DecodeLocaleAndSize() works again since both agree on using the
process active code page.
In 3.7+, per bpo-36779, time.tzname is set when the module is first loaded by
directly querying GetTimeZoneInformation(). time.tzset() is still not
supported, despite the fact that it was always supported by ucrt, so this value
can become stale relative to strftime("%Z").
Starting with Windows 10 v2004 (build 19041), ucrt uses an internal
wide-character version of the time-zone name that gets returned by an internal
__wide_tzname() call and used for "%Z" in wcsftime(). The wide-character value
gets updated by _tzset() and kept in sync with _tzname.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue10653>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com