Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.4k
Commitb4c7def
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@zoobahttps://bugs.python.org/issue36779
1 parent95f61c8 commitb4c7def
File tree
2 files changed
+16
-0
lines changed- Misc/NEWS.d/next/Windows
- Modules
2 files changed
+16
-0
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1581 | 1581 | | |
1582 | 1582 | | |
1583 | 1583 | | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
1584 | 1597 | | |
1585 | 1598 | | |
1586 | 1599 | | |
| |||
1590 | 1603 | | |
1591 | 1604 | | |
1592 | 1605 | | |
| 1606 | + | |
1593 | 1607 | | |
1594 | 1608 | | |
1595 | 1609 | | |
| |||
0 commit comments
Comments
(0)