Author Paul Monson
Recipients Paul Monson
Date 2019-05-03.00:45:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org>
In-reply-to
Content
Need to work around a CRT bug in the use of _tzset() + _tzname[] 
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.

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
History
Date User Action Args
2019-05-03 00:45:22Paul Monsonsetrecipients: + Paul Monson
2019-05-03 00:45:22Paul Monsonsetmessageid: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org>
2019-05-03 00:45:22Paul Monsonlinkissue36779 messages
2019-05-03 00:45:22Paul Monsoncreate