On 2026-07-19 17:07, Paul Gilmartin via tz wrote:
Any ideas? This must have been done before.
The POSIX spec provides no way to check whether a TZ setting is valid. That is, behavior is undefined when TZ is invalid.
tzcode provides a way: if tzalloc("ABC") returns a null pointer and errno has a value other than ENOMEM, then "ABC" is invalid. So if you're on platforms like NetBSD that have tzalloc, you have a way. Or you can copy tzcode and use its tzalloc.
