[tz] IANA timezone database - request to add Omaha, Nebraska

Guy Harris gharris at sonic.net
Tue Jul 26 19:52:25 UTC 2022


On Jul 26, 2022, at 11:13 AM, Paul Eggert via tz <tz at iana.org> wrote:

> On 7/26/22 04:45, Florian Weimer via tz wrote:
>> How does this system implement a programming interface that enumerates
>> the TZ rules?  The typical way is to use readlink to get the IANA
>> identifier, and then use that to look up the rules in the zic input file
>> (because the compiled blobs lack this information).
> 
> It depends on what "TZ rules" means.
> 
> If it means the Rule lines in .zi files, that's not intended for end-user consumption. That information is absent from the TZif files output by zic. So I doubt whether you meant that.

Given that he said "look up the rules in the zic input file (because the compiled blobs lack this information)", he's presumably aware of that, and probably *did* mean "the Rule lines in .zi files".

If some software needs information based on that - i.e., needs to know when the current tzdb region, or a particular tzdb region, changed or will change its offset from UTC or its abbreviation - then perhaps its developers should propose a new API that implementations such as the tzdb reference implementation could provide.  (Hopefully those developers are aware that a given tzdb region can change, over time, which rule sets it uses!)

> If it means to enumerate only Zones and omit Links, which is what I think you mean, then readlink will work only if Links are implemented via symbolic links. Although Debian and Red Hat based systems do that, the default TZDB installation does not (it uses hard links), and Alpine, macOS, NetBSD, OpenBSD, OpenSUSE etc. use the default either because it is the default or because it is a bit more efficient. (FreeBSD uses neither hard nor symbolic links: it uses copies and I don't know why.) And I think Android has its own scheme where all the entries are in a single file. So although readlink is common, I wouldn't call it "typical".

macOS also appears to use copies:

	$ ls -li /usr/share/zoneinfo/America/Panama /usr/share/zoneinfo/America/Cayman
	137328357 -rw-r--r--  1 root  wheel  177 Oct 25  2021 /usr/share/zoneinfo/America/Cayman
	137328384 -rw-r--r--  1 root  wheel  177 Oct 25  2021 /usr/share/zoneinfo/America/Panama
	$ cmp /usr/share/zoneinfo/America/Panama /usr/share/zoneinfo/America/Cayman
	$ 

> A good way to enumerate only Zones with 2017c-and-later is to read the installed tzdata.zi file and look for Zone lines. Unfortunately only some systems (e.g., Debian, Red Hat) install tzdata.zi;

Not macOS (as of the current Ventura beta, which uses 2022a).

> Distros like FreeBSD should consider installing tzdata.zi

As should CupertinoBSD. :-) Deborah?  Should I file a Radar^WFeedback?



More information about the tz mailing list