Paul Eggert <eggert@cs.ucla.edu> writes:
On 11/9/21 06:52, Tom Lane wrote:
AFAIK, the only way to enumerate the available zones in a typical installation is to search the directory tree.
Although that was true years ago, since 2017c tzdb has distributed a file tzdata.zi that also works.
Is that present in every downstream distribution? Is it specified in the TZif RFC? More to the point, I thought this thread was about whether tzcode's APIs are sufficient for everyone's use cases. A discussion back at the Postgres project [1] reminded me of another requirement that is only poorly satisfied by the existing APIs: how can programs tell when zone data has changed? Right now you can sort of tell by examining the mod dates in the tzdata file tree, but that gives you a ton of false positives, even granted that examining the file tree is something that tzcode users ought to be doing. It'd sure be nice if individual zone data files had a version number or "this data was last changed on <date>" sort of label, and tzcode provided a way to get that for any particular zone ID. An overall tzdata version number ("2021e" etc) would be a second-best answer, but AFAIK that's not available in any standardized way either. regards, tom lane [1] https://www.postgresql.org/message-id/flat/CADT4RqDVBbqSbQVH_v_vS5_9DPhjsfmQ...