diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-06-13 13:22:51 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2019-06-13 13:22:51 (GMT) |
commit | 0a9baec16c17d261377fb8a31a57d8c397e25af6 (patch) | |
tree | b3235be7d5b190799473dc60cb706abfeb7861d9 /setup.py | |
parent | cbda40db7b604b377acfd3f04e19407ca33748a7 (diff) | |
download | cpython-0a9baec16c17d261377fb8a31a57d8c397e25af6.zip cpython-0a9baec16c17d261377fb8a31a57d8c397e25af6.tar.gz cpython-0a9baec16c17d261377fb8a31a57d8c397e25af6.tar.bz2 |
bpo-36779: time.tzname returns empty string on Windows if default cod… (GH-13073) (GH-14032)
Calling setlocale(LC_CTYPE, "") on a system where GetACP() returns CP_UTF8 results in empty strings in _tzname[].
This causes time.tzname to be an empty string.
I have reported the bug to the UCRT team and will follow up, but it will take some time get a fix into production.
In the meantime one possible workaround is to temporarily change the locale by calling setlocale(LC_CTYPE, "C") before calling _tzset and restore the current locale after if the GetACP() == CP_UTF8 or CP_UTF7
@zooba
https://bugs.python.org/issue36779
(cherry picked from commit b4c7defe58695a6670a8fdeaef67a638bbb47e42)
Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
Diffstat (limited to 'setup.py')
0 files changed, 0 insertions, 0 deletions