diff --git a/Misc/NEWS b/Misc/NEWS index 63099ac96ea..681fae36175 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -305,6 +305,9 @@ Core and Builtins Library ------- +- Issue #10653: On Windows, use strftime() instead of wcsftime() because + wcsftime() doesn't format time zone correctly. + - Issue #13150: The tokenize module doesn't compile large regular expressions at startup anymore. diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 2ea02476266..24066d83f0b 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -386,6 +386,11 @@ checktm(struct tm* buf) return 1; } +#ifdef MS_WINDOWS + /* wcsftime() doesn't format correctly time zones, see issue #10653 */ +# undef HAVE_WCSFTIME +#endif + #ifdef HAVE_STRFTIME #ifdef HAVE_WCSFTIME #define time_char wchar_t