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 eryksun
Recipients belopolsky, brian.curtin, eryksun, jkloth, ocean-city, pitrou, python-dev, vstinner
Date 2021-03-07.12:36:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1615120579.02.0.698010366875.issue10653@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-03-07 12:36:19eryksunsetrecipients: + eryksun, belopolsky, pitrou, vstinner, ocean-city, jkloth, brian.curtin, python-dev
2021-03-07 12:36:19eryksunsetmessageid: <1615120579.02.0.698010366875.issue10653@roundup.psfhosted.org>
2021-03-07 12:36:19eryksunlinkissue10653 messages
2021-03-07 12:36:18eryksuncreate