Today in POSIX fun courtesy of the remind(1) mailing-list (slightly modified for broader understandability):
⸻
[There's] no way to know if you use a valid time zone name. That's because the POSIX API for setting a timezone is (I kid you not...):
/* why use "UTC" when you can be in the Banana timezone*/
const char* zone_name = "banana";
setenv("TZ", zone_name, 1);
tzset();
and tzset() returns void...there's no possible error return from tzset()...not even errno. This is not one of POSIX's shining moments.
⸻
🍌