[tz] Interfaces (was Re: Issues with pre-1970 information in TZDB)

Guy Harris gharris at sonic.net
Thu Sep 23 06:23:58 UTC 2021


On Sep 22, 2021, at 11:15 PM, Murray S. Kucherawy via tz <tz at iana.org> wrote:

> I think this warrants a critical question: What is the intended interface to the data?  If the intent of the coordinators/maintainers is that consumers will use the compiled version,

In the early days of the project, I don't remember there being any intent whatsoever to have the tzdb source files being directly read by consumers; the primary use of the database was in UN*X libraries that either incorporated the reference implementation of code to read the compiled files and use them to implement localtime()/mktime()/etc., or in UN*X libraries that implemented their own code to do that (I think that's what GNU libc did).

> then one could argue that those consuming the data directly do so at their own risk, because that interface isn't expressly supported.  If so, it would be a layering violation to read the files directly.
> 
> But maybe this was never specified, and the interface applications are to use is thus ambiguous (i.e., they have a choice), and it's possibly too far along now to compel them to change.

I don't think it was *explicitly* specified, and, for whatever reason, at least some consumers chose to directly read the source files.

It'd probably be technically difficult, and contentious, to change that.

A possibility would be to have:

	the *real* source files, which might even have a different file format if that turns out to be useful (e.g., specifying CLDR-style metazones);

	the "textual compiled files", which are in the current format, and which would be generated as part of the release process;

	the binary compiled files, just as we currently have.



More information about the tz mailing list