[tz] Add option to act like global-tz

Paul Eggert eggert at cs.ucla.edu
Wed Aug 17 00:51:18 UTC 2022

On 8/16/22 14:57, Bradley White wrote:
> $ TZ=<path-to-standard>/Africa/Freetown date -d @1660625107
> Tue Aug 16 04:45:07 GMT 2022
> $ TZ=<path-to-packrat>/Africa/Freetown date -d @1660625107
> Tue Aug 16 05:05:07 +01 2022
> and ...
> $ TZ=<path-to-standard>/Pacific/Saipan date -d @230659200
> Sun Apr 24 03:00:00 GDT 1977
> $ TZ=<path-to-packrat>/Pacific/Saipan date -d @230659200
> Sun Apr 24 02:00:00 +10 1977

Thanks, good catches.

The Africa/Freetown glitch was introduced in 2022a when fixing other 
problems with Sierra Leone.

The Pacific/Saipan glitch is more interesting. It was introduced in 
2018h, when we added DST rules for Pacific/Guam but I didn't notice that 
this should have caused Pacific/Saipan to split off and so I mistakenly 
kept the latter linked to the former. However, I just now looked into 
this and discovered that the old Pacific/Saipan data entries (taken from 
Shanks) were also mistaken. In the default build, as luck would have it 
the 2015h merge of Pacific/Guam and Pacific/Saipan, together with my 
2018h mistake, actually *fixed* bugs in Pacific/Saipan because the merge 
and my subsequent mistake caused Shanks's mistakes to be ignored.

I ran the following test to find similar glitches:

   rm -fr tza tzb
   make clean
   make TOPDIR=$PWD/tza ZFLAGS=-r at 0 install
   ./zdump -i $(awk '/^[^#]/{print $3}' zone.tab) >a.tzs
   make clean
   make TOPDIR=$PWD/tzb ZFLAGS=-r at 0 \
     PACKRATDATA=backzone PACKRATLIST=zone.tab \
   ./zdump -i $(awk '/^[^#]/{print $3}' zone.tab) >b.tzs
   diff a.tzs b.tzs
   rm -r tza tzb a.tzs b.tzs

and I found one more glitch: the time zone abbreviation for 
Pacific/Midway disagreed (this glitch was introduced in 2015b).

I installed into the development repository the attached patch to 
'backzone' to fix these glitches. The above test passes now.

Because this patch affects only 'backzone', it doesn't affect any 
timestamps in the default build.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-some-post-1970-PACKRATLIST-glitches.patch
Type: text/x-patch
Size: 2343 bytes
Desc: not available
URL: <http://mm.icann.org/pipermail/tz/attachments/20220816/c4e6d54c/attachment.bin>

More information about the tz mailing list