NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: tzfile



On Wed, 21 Jul 2021, Emmanuel Dreyfus wrote:

Copying a tzfile from Linux on NetBSD works around the problem in GNUstep,
and comparing the files, I notice a NetBSD weirdness as shown in
/usr/share/zoneinfo/Europe/Paris hexdump below:

00000000  54 5a 69 66 32 00 00 00  00 00 00 00 00 00 00 00  |TZif2...........|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  00 00 00 00 00 00 00 01  00 00 00 01 00 00 00 00  |................|
00000030  00 00 00 54 5a 69 66 32  00 00 00 00 00 00 00 00  |...TZif2........|
00000040  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000050  00 00 00 00 00 00 65 00  00 00 07 00 00 00 1f ff  |......e.........|

Why is the header duplicated with a different content at offset 0x33?


Seems deliberate. From tzfile(5):

Version 2 format

  For version-2-format timezone files, the above header and data are fol-
  lowed by a second header and data, identical in format except that eight
  bytes are used for each transition time or leap second time.


-RVP



Home | Main Index | Thread Index | Old Index