1TZFILE(5)                     File Formats Manual                    TZFILE(5)
2
3
4

NAME

6       tzfile - time zone information
7

SYNOPSIS

9       #include <tzfile.h>
10

DESCRIPTION

12       The  time  zone  information  files  used  by tzset(3) begin with bytes
13       reserved for future use, followed by three  four-byte  values  of  type
14       long,  written in a ``standard'' byte order (the high-order byte of the
15       value is written first).  These values are, in order:
16
17       tzh_timecnt
18              The number of "transition times" for which data is stored in the
19              file.
20
21       tzh_typecnt
22              The number of "local time types" for which data is stored in the
23              file (must not be zero).
24
25       tzh_charcnt
26              The number of characters of  "time  zone  abbreviation  strings"
27              stored in the file.
28
29       The  above  header  is followed by tzh_timecnt four-byte values of type
30       long, sorted in ascending order.  These values are written  in  ``stan‐
31       dard''  byte  order.  Each is used as a transition time (as returned by
32       time(2)) at which the rules for computing local time change.  Next come
33       tzh_timecnt one-byte values of type unsigned char; each one tells which
34       of the different types of ``local time'' types described in the file is
35       associated  with  the same-indexed transition time.  These values serve
36       as indices into an array of ttinfo structures that appears next in  the
37       file; these structures are defined as follows:
38
39            struct ttinfo {
40                 long          tt_gmtoff;
41                 int           tt_isdst;
42                 unsigned int  tt_abbrind;
43            };
44
45       Each  structure  is  written as a four-byte value for tt_gmtoff of type
46       long, in a standard byte  order,  followed  by  a  one-byte  value  for
47       tt_isdst  and  a  one-byte  value  for  tt_abbrind.  In each structure,
48       tt_gmtoff gives the number of seconds to  be  added  to  GMT,  tt_isdst
49       tells  whether  tm_isdst  should be set by localtime (3) and tt_abbrind
50       serves as an index into the array of time zone abbreviation  characters
51       that follow the ttinfo structure(s) in the file.
52
53       Localtime uses the first standard-time ttinfo structure in the file (or
54       simply the first ttinfo structure in the  absence  of  a  standard-time
55       structure)  if  either tzh_timecnt is zero or the time argument is less
56       than the first transition time recorded in the file.
57

SEE ALSO

59       ctime(3)
60
61
62
63System V                                                             TZFILE(5)
Impressum