On Tue, Sep 03, 2024 at 11:34:27AM GMT, Bruno Haible wrote: > POSIX specifies that gmtime_r sets the tm_zone field to "UTC". (Interestingly, > no such requirement exists for gmtime.)
But see https://austingroupbugs.net/view.php?id=1797#c6794; the Austin Group is trying to work with the C committee to get this fixed in the future (with Paul's help); among other things, it fixes gmtime() and gmtime_r() to both have to set a value of either "GMT" or "UTC": | On page 1211 line 41381 section gmtime() DESCRIPTION, change (already in CX shading): | | | ...where the names in the structure and in the expression correspond. | | | to: | | | ...where the names in the structure and in the expression | correspond; additionally, the tm_gmtoff field of the struct tm shall | be set to 0, and the tm_zone field shall be set to a pointer to an | implementation-defined string set to "UTC" or "GMT", which shall | have static storage duration. -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org