[Bug libstdc++/108409] std::chrono::current_zone() doesn't work on AIX

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jan 15 13:56:12 GMT 2023


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108409

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #4)
> The current code doesn't work on Windows either.

https://learn.microsoft.com/en-us/windows/win32/api/timezoneapi/nf-timezoneapi-gettimezoneinformation
only gives us the abbreviated names of the standard and daylight zones, e.g.
"EST" and "EDT". But those names are not unique and cannot be used to map to a
time zone, as the C++ standard points out in [time.zone.info.sys] p6:

"Abbreviations are not unique among the time_zones, and so one cannot reliably
map abbreviations back to a time_zone and UTC offset."


More information about the Gcc-bugs mailing list