On Tuesday, June 4 2019, "Guy Harris" wrote to "Steve Summit, tz@iana.org" saying:
BTW, what happens on a system that *does* have them if you:
call localtime()/localtime_r();
set the TZ environment variable in your program to a new value and call tzset();
try to use the tm_zone string from the previous localtime()/localtime_r() call?
Is the tm_zone string guaranteed to survive the tzset() call?
No, its value becomes undefined. https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/strft... : If a struct tm broken-down time structure is created by localtime() or localtime_r(), or modified by mktime(), and the value of TZ is subsequently modified, the results of the %Z and %z strftime() conversion specifiers are undefined, when strftime() is called with such a broken-down time structure. This was specifically written to allow the behavior where strftime's %Z substitutes tm->tm_zone. -- Jonathan Lennox lennox@cs.columbia.edu