From: Victor Stinner Date: Fri, 14 Oct 2011 00:36:13 +0000 (+0200) Subject: Issue #10653: On Windows, use strftime() instead of wcsftime() because X-Git-Tag: v3.3.0a1~1173^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1f32ca0ade3a1bc60c0ca18efa4756d3c5282f1;p=python Issue #10653: On Windows, use strftime() instead of wcsftime() because wcsftime() doesn't format time zone correctly. --- diff --git a/Misc/NEWS b/Misc/NEWS index 3c3bff8264..44447bacac 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -43,6 +43,9 @@ Core and Builtins Library ------- +- Issue #10653: On Windows, use strftime() instead of wcsftime() because + wcsftime() doesn't format time zone correctly. + - Issue #11171: Fix distutils.sysconfig.get_makefile_filename when Python was configured with different prefix and exec-prefix. diff --git a/Modules/timemodule.c b/Modules/timemodule.c index 3af041a2b6..34e4875a29 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -431,6 +431,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