[tz] Idea for internationalized time point unique time zone abbreviations
pmachata at redhat.com
Thu Jun 7 18:11:53 UTC 2012
Garrett Wollman <wollman at csail.mit.edu> writes:
> <<On Thu, 07 Jun 2012 18:53:20 +0200, Petr Machata <pmachata at redhat.com> said:
>> In Fedora Linux in particular zone identifier translations are stuffed
>> at system-config-date. I recall that Debian has a dedicated package for
>> that. In both these cases, the translation is done by calling gettext
>> on a time zone identifier.
> That seems like a really odd thing to do. Why not translate zone.tab?
> That's what user interfaces should be using to select zones anyway.
> The TZid is just a token you can hand to the C library (the fact that
> it's also a pathname is just an implementation detail).
We translate some of the strings in zone.tab, yes. system-config-date
is a GUI application for clock management that presents a map and a list
of zones. The zones IDs and descriptions need to be localized, that's
why we translate it.
>> That's because the TZ identifier is not stored in zoneinfo file. Doing
>> so would prevent us from hardlinking equal zones to save disk space.
>> (Though I don't know if this is the reason the TZID is absent from the
>> file, or the hardlinking trick is the consequence of this.)
> In recent releases of FreeBSD the tzsetup utility automatically stores
> the installed zone's TZid in /var/cache/zoneinfo so that it can be
> reinstalled without user intervention when the tzdata is updated using
> "tzsetup -r". Many FreeBSD machines still have a separate /usr
> partition becuase that is the traditional partitioning setup.
It's similar in Linux as well, the file is /etc/sysconfig/clock in
Fedora. Then we have a trigger on tzdata package that copies the new
zone over when tzdata is updated. But nothing prevents a user from
copying stuff over by hand, at which point the information in
/etc/sysconfig/clock is wrong.
More information about the tz