Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 792b47f

Browse files
author
Victor Stinner
committed
(Merge 3.2) Issue #10653: On Windows, use strftime() instead of wcsftime()
because wcsftime() doesn't format time zone correctly.
2 parents f5cff56 + c1f32ca commit 792b47f

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,9 @@ Core and Builtins
305305
Library
306306
-------
307307

308+
- Issue #10653: On Windows, use strftime() instead of wcsftime() because
309+
wcsftime() doesn't format time zone correctly.
310+
308311
- Issue #13150: The tokenize module doesn't compile large regular expressions
309312
at startup anymore.
310313

Modules/timemodule.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,11 @@ checktm(struct tm* buf)
386386
return 1;
387387
}
388388

389+
#ifdef MS_WINDOWS
390+
/* wcsftime() doesn't format correctly time zones, see issue #10653 */
391+
# undef HAVE_WCSFTIME
392+
#endif
393+
389394
#ifdef HAVE_STRFTIME
390395
#ifdef HAVE_WCSFTIME
391396
#define time_char wchar_t

0 commit comments

Comments
 (0)