[tz] What are the interfaces to the TZDB?

Paul Eggert eggert at cs.ucla.edu
Fri Nov 12 04:49:15 UTC 2021


On 11/11/21 10:51, Tom Lane wrote:

>> 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?

It's present in every tzdb distribution. Nothing (not even TZif files) 
is present in every downstream redistribution of tzdb data.

> Is it specified in the TZif RFC?

No.

> More to the point, I thought this thread was about
> whether tzcode's APIs are sufficient for everyone's use cases.

No, primarily it's about the "API" for tzdb, not about tzcode directly. 
That is, the main issue here comes from downstream uses that reach into 
the tzdb source code directly without going through the tzcode API. In 
effect there appears to be a not-formalized "API" (it's not really an 
API - it's not written down so in some sense it doesn't even exist!) 
that is the source of these issues.

> It'd sure be nice if individual zone data files had a version number

I'm a bit skeptical of the cost/benefit of that, for the same reason I'm 
skeptical of the utility of putting version numbers in files generally - 
the version numbers are not generally trustworthy and they are often 
more trouble than they're worth. Anyway, there isn't really room in the 
current TZif file format for a general-enough version number, though of 
course we could extend the format in a future RFC to make room for it.




More information about the tz mailing list