Message341318
| 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:22 | Paul Monson | set | recipients:
+ Paul Monson |
| 2019年05月03日 00:45:22 | Paul Monson | set | messageid: <1556844322.34.0.979846087129.issue36779@roundup.psfhosted.org> |
| 2019年05月03日 00:45:22 | Paul Monson | link | issue36779 messages |
| 2019年05月03日 00:45:22 | Paul Monson | create |
|