On 2/10/17 12:18 AM, Paul Eggert wrote:
John Hawkinson wrote:
the idea is to have the string displayable using a semi-standard tool.
On GNU/Linux a common tool for that is the 'file' command. For example, on Fedora 25:
$ file /usr/share/zoneinfo/America/Los_Angeles /usr/share/zoneinfo/America/Los_Angeles: timezone data, version 2, 5 gmt time flags, 5 std time flags, no leap seconds, 186 transition times, 5 abbreviation chars
Here the string "America/Los_Angeles" is already part of the output. Yes, but consider: $ file /usr/share/zoneinfo/America/Los_Angeles /usr/share/zoneinfo/America/Los_Angeles: timezone data, old version, 4 gmt time flags, 4 std time flags, no leap seconds, 185 transition times, 4 abbreviation chars srl@filfla:/tmp/_ $ file /etc/localtime /etc/localtime: timezone data, old version, 4 gmt time flags, 4 std time flags, no leap seconds, 185 transition times, 4 abbreviation chars
Apparently 'file' didn't want to mess with readlink() either. I don't blame it.
Presumably the intended application for a change to the binary file format is when the binary file has been renamed or linked and someone wants to know the "originally-intended" or "canonical" name. Just so. tz follows the Unix tradition where files do not have canonical names - a design flaw to some, and a design feature to others. but tz does have:
northamerica: Zone America/Los_Angeles backward: Link America/Los_Angeles US/Pacific So, formally, what I am looking for is "the Zone entry of the stanza which zic used to generate the tzfile output." I'm very happy to leave filenames out of the definitional picture. Steven