[tz] Version in zoneinfo files?

Bradley White bww at acm.org
Tue Oct 27 15:19:17 UTC 2015


On Tue, Oct 27, 2015 at 7:40 AM, Guy Harris <guy at alum.mit.edu> wrote:

> On Oct 26, 2015, at 2:50 PM, Bradley White <bww at acm.org> wrote:
> > On Sun, Oct 25, 2015 at 2:30 PM, Guy Harris <guy at alum.mit.edu> wrote:
> >> Is this just something to let people know whether they have an
> up-to-date version of the tzdb files or not?
> >
> > Yes, although I think of it simply as let people know what version of a
> tzdb file they have.  (Whether that is the latest version is a separate
> question.)
>
> Which version they have, or which version of the IANA tzdb the version
> they have is based on? :-)
>

The version of the data file that was passed to zic to produce the zoneinfo
file in question.

(If someone downstream wants to modify data files and recompile them, then
sub-versioning is up to them.)


> > I would even propose an additional self-identification step: include the
> zone name in tzdb file.
>
> Which zone name is "the" zone name?  The zone name on the system on which
> zic was run?
>

The zone name is the Zone field from the data file used to produce the
zoneinfo file.

(There would be a question about how to handle Links.)


> > Then you could tell, for example, where /etc/localtime came from.
>
> Well, on my system, it came from a symlink() call:
>
> $ ls -l /etc/localtime
> lrwxr-xr-x  1 root  wheel  39 Oct 10 21:20 /etc/localtime ->
> /usr/share/zoneinfo/America/Los_Angeles
>

And on others it is a copy.  It seems preferable to have the data be
self identifying rather than assuming anything about symlinks.


> although if I were traveling there would be more than such symlink() call,
> one made whenever the machine changes what tzdb zone it's in (I checked
> "Set time zone automatically using current location" in the "Time Zone"
> subpane of the "Date & Time" pane of System Preferences").  Should the code
> making those symlink() calls also write to each compiled tzdb file under
> /usr/share/zoneinfo, updating the zone name?


No, the zone name in any zoneinfo file would be constant.

As an example, perhaps we could then see:

$ file /etc/localtime
/etc/localtime: timezone data, *zone America/New_York*, *release
2015f-0ubuntu0.14.04*, version 2, 4 gmt time flags, 4 std time flags, no
leap seconds, 235 transition times, 4 abbreviation chars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mm.icann.org/pipermail/tz/attachments/20151027/7f4f516e/attachment.html>


More information about the tz mailing list