Paul Eggert via tz wrote in <[email protected]>: |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.
It surely is easy to notoriously ask for inclusion of tzalloc/free in GNU libc, last time i searched the internet, and if i recall found mails of yours where you talked about doing so in .. 2014? There is, fwiw, [1] that asks for inclusion in POSIX. TZ objects would be a real improvement, being able to test for validity, too. Last i saw it coming up was for the free software dinosaur "remind" (calendar etc) [2]. [1] https://austingroupbugs.net/view.php?id=1794 [2] https://dianne.skoll.ca/projects/remind/ P.S.: funny as it is (scripting magic likely), now that i looked at her site again, i saw [3] ("Scientist Has Definitive Solution to the Daylight Saving Time Conundrum"). [3] https://dianne.skoll.ca/writings/totally-true-news/2026-07-20-time.php --steffen | |Der Kragenbaer, The moon bear, |der holt sich munter he cheerfully and one by one |einen nach dem anderen runter wa.ks himself off |(By Robert Gernhardt)
