Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.7] bpo-36779: time.tzname returns empty string on Windows if default cod… (GH-13073)#14057

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@miss-islington
Copy link
Contributor

@miss-islingtonmiss-islington commentedJun 13, 2019
edited by bedevere-bot
Loading

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 commitb4c7def)

Co-authored-by: Paul Monsonpaulmon@users.noreply.github.com

https://bugs.python.org/issue36779

pythonGH-13073)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(cherry picked from commitb4c7def)Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM, good bot.

@miss-islington
Copy link
ContributorAuthor

@paulmon: Status check is done, and it's a success ✅ .

@miss-islingtonmiss-islington merged commit6a433f5 intopython:3.7Jun 13, 2019
@miss-islingtonmiss-islington deleted the backport-b4c7def-3.7 branchJune 13, 2019 13:42
@miss-islington
Copy link
ContributorAuthor

@paulmon: Status check is done, and it's a success ✅ .

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@miss-islington@vstinner@the-knights-who-say-ni@bedevere-bot@paulmon

[8]ページ先頭

©2009-2025 Movatter.jp