Time zone confusion and implementation hints

Guy Harris guy at alum.mit.edu
Tue Jul 6 17:24:02 UTC 2010

On Jul 2, 2010, at 11:21 AM, Bill Seymour wrote:

> Attached is my understanding of the format of the binaries.

Not quite.  The tzh_ttisgmtcnt, tzh_ttisstdcnt, tzh_leapcnt, tzh_timecnt, tzh_typecnt, and tzh_charcnt fields are always 4 bytes, in both version 1 and 2.  The transition times, and the leap-second times (but not the leap seconds counts), are 4 bytes in version 1 and 2 bytes in version 2.

You might want to use uint32_t, and uint64_t, rather than long, to make it clear that the length of the fields in question doesn't necessarily match the size of a long on the platform on which the code is running.

More information about the tz mailing list