This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eryksun
Recipients Aaron.Meurer, Václav Dvořák, civalin, docs@python, ede123, eryksun, ezio.melotti, kepkin, martin-t, paul.moore, r.david.murray, steve.dower, tim.golden, vstinner, zach.ware
Date 2021-03-28.19:24:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I closed bpo-20010 because the official PSF distributions of Python 3.5+ for Windows use the Universal CRT (ucrt), the system C runtime library for applications. ucrt does not have this problem with the "%z" format code. For example, using ctypes:

    >>> import ctypes
    >>> timeptr = (ctypes.c_int * 9)()
    >>> dest = (ctypes.c_char * 100)()

    >>> ucrt = ctypes.CDLL('ucrtbase', use_errno=True)
    >>> ucrt.strftime(dest, 100, b"%z", timeptr)
    >>> dest.value

Mingw-w64 probably links against msvcrt.dll, the private CRT that's used by some system components. For example:

    >>> msvcrt = ctypes.CDLL('msvcrt', use_errno=True)
    >>> msvcrt.strftime(dest, 100, b"%z", timeptr)
    >>> dest.value
    b'Mitteleurop\xe4ische Zeit'

This a third-party problem since Python is simply calling C strftime(). I'll leave this open for a core developer to consider, but I don't think a workaround is likely at this level. IIRC, compiling Python with Mingw-w64 requires extensive patching, so a workaround is more likely to be applied at that level.
Date User Action Args
2021-03-28 19:24:26eryksunsetrecipients: + eryksun, paul.moore, vstinner, tim.golden, ezio.melotti, r.david.murray, Aaron.Meurer, docs@python, zach.ware, steve.dower, civalin, kepkin, martin-t, Václav Dvořák, ede123
2021-03-28 19:24:26eryksunsetmessageid: <>
2021-03-28 19:24:26eryksunlinkissue43649 messages
2021-03-28 19:24:26eryksuncreate