NetBSD-Users archive

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

Re: tzfile



On Wed, Jul 21, 2021 at 11:24:07AM +0000, RVP wrote:
> Seems deliberate. From tzfile(5):

I need some help reading it. zdump -i /usr/share/zoneinfo/Europe/Paris
reports 1108 transitions.

Here is the file:

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.........|

struct tzhead for v2+ starts at 0x33, the fields are
tzh_magic      4 bytes @ 0x33  value "TZif"
tzh_version    1 byte  @ 0x37  value "2"
tzh_reserved  15 bytes @ 0x38   
tzh_ttisutcnt  4 bytes @ 0x47  value 0
tzh_ttisstdcnt 4 bytes @ 0x4b  value 0
tzh_leapcnt    4 bytes @ 0x4f  value 0
tzh_timecnt    4 bytes @ 0x53  value 0x65 = 101 in decimal

tzh_timecnt is "coded number of transition times". How do I find 1108 for 
tzh_timecnt?


-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index