https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114645
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- The libc time zone doesn't necessarily correspond to anything in the IANA database anyway. If you use a POSIX time zone definition like TZ="abc4abd" then libc will use that to generate a custom time zone and use that for localtime, ctime etc. That's not compatible with the std::chrono model, which uses the IANA zones. So "the time zone libc would consider local" might not be a real time zone anyway. If you want to interpret $TZ then you can write code to do so, and convert that into a name that std::chrono::locale_zone understands. So if TZ is an IANA name, use it directly, otherwise extract the offset part and then use something like "Etc/GMT-8".