[tz] Decoding timezone data

Ian Abbott abbotti at mev.co.uk
Tue Nov 8 12:14:15 UTC 2011

On 2011-11-08 11:45, Zefram wrote:
> Ian Abbott wrote:
>> As an other aside, is there a better way to describe the in-file layout
>> of the ttinfo array members than using a C struct?
> Exactly what follows the struct code:
>     Each structure is written as a four-byte value for tt_gmtoff
>     of type long, in a standard byte order, followed by a one-
>     byte value for tt_isdst and a one-byte value for tt_abbrind.
> In file format terminology, that would be:
>     Each ttinfo structure consists of a four-byte big-endian signed
>     integer tt_gmtoff, a one-byte signed integer tt_isdst, and a one-byte
>     unsigned integer tt_abbrind.

Once it has been established in the introductory matter that all
integers are in big-endian order, there would be no need to specify that
for individual fields.  The introductory matter should also specify that
signed integers are stored in 2's complement format.

-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

More information about the tz mailing list