Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-52551: Use wcsftime() to implement time.strftime() on Windows#125658
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
gh-52551: Use wcsftime() to implement time.strftime() on Windows#125658
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Modules/timemodule.c Outdated
| #ifdefMS_WINDOWS | ||
| /* wcsftime() doesn't format correctly time zones, see issue #10653 */ | ||
| # undef HAVE_WCSFTIME | ||
| # defineHAVE_WCSFTIME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There are compiler warnings: 'HAVE_WCSFTIME': macro redefinition [D:\a\cpython\cpython\PCbuild_freeze_module.vcxproj]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Oh, I did not find where it was defined in C.
vstinner commentedOct 18, 2024
Is#54862 issue solved on Windows? |
serhiy-storchaka commentedOct 18, 2024
What exactly is that issue about? I get no mojibake: >>>import time>>> time.strftime('%Z')'Фінляндія (літо)'>>> time.tzname('Фінляндія (зима)', 'Фінляндія (літо)') But it crashes on invalid format string (like |
serhiy-storchaka commentedOct 18, 2024
Well, this was unrelated. |
vstinner commentedOct 18, 2024
I changed my Windows language to French and the timezone to UTC+14, I managed to get a non-ASCII timezone name: So at least for this locale (French_France.1252),it works as expected. |
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
serhiy-storchaka commentedOct 19, 2024
Thank you for your review@vstinner. |
a7443a1 intopython:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.