STINNER Victor added the comment:
According to CRT source code:
- tzset() uses WideCharToMultiByte(lc_cp, 0, tzinfo.StandardName, -1,
tzname[0], _TZ_STRINGS_SIZE - 1, NULL, &defused) with lc_cp =
___lc_codepage_func().
- wcsftime("%z") and wcsftime("%Z") use _mbstowcs_s_l() to decode the time
zone name
I tried to call ___lc_codepage_func(): it returns 0. I suppose that it means
that mbstowcs() and wcstombs() use the ANSI code page.
Instead of trying to bet what is the correct encoding, it would be simpler (and
safer) to read the Unicode version of the tzname array: StandardName and
DaylightName of GetTimeZoneInformation().
If anything is changed, time.strftime(), time.strptime(),
datetime.datetime.strftime() and time.tzname must be checked (with "%Z" format).
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16322>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com