Valid for what? As long as that's unstated, I think the question is unanswerable. E.g. if "valid" means you can get valid-appearing output from date(1), then on a normal healthy system unset would be valid. Does that sound consistent with what you want?
On Sun, Jul 19, 2026, 20:07 Paul Gilmartin via tz <[email protected]> wrote: > Simple task. Verify that a user-supplied TZ value is valid. > > So,I imagined, tzset() || perror(); > > Alas, tzset neither returns status nor sets errno. > > stat( "/usr/share/zoneinfo/$TZ" )? But: > o I'd like to support systems not supporting tzdata. > (I know one important one.) > o I'd like to support/verify POSIX format > e.g.: "MST7MDT,M3.2.0,M11.1.0" > > Any ideas? This must have been done before. > > -- > Thanks, > gil > >
