LINUX时区信息文件格式

timezone信息和设置

LINUX 时区信息

用 info tzfile 可以查看 /usr/share/zoneinfo 目录下 tz 文件的格式说明;

TZFILE(5)                                                                                              Linux Programmer's Manual                                                                                             TZFILE(5)

NAME
       tzfile - timezone information

DESCRIPTION
       This page describes the structure of the timezone files used by tzset(3).  These files are typically found under one of the directories /usr/lib/zoneinfo or /usr/share/zoneinfo.

       Timezone information files begin with a 44-byte header structured as follows:

       *  The magic four-byte sequence "TZif" identifying this as a timezone information file.

       *  A single character identifying the version of the file's format: either an ASCII NUL ('\0') or a '2' (0x32).

       *  Fifteen bytes containing zeros reserved for future use.

       *  Six four-byte values of type long, written in a "standard" byte order (the high-order byte of the value is written first).  These values are, in order:

          tzh_ttisgmtcnt
                 The number of UTC/local indicators stored in the file.

          tzh_ttisstdcnt
                 The number of standard/wall indicators stored in the file.

          tzh_leapcnt
                 The number of leap seconds for which data is stored in the file.

          tzh_timecnt
                 The number of "transition times" for which data is stored in the file.

          tzh_typecnt
                 The number of "local time types" for which data is stored in the file (must not be zero).

          tzh_charcnt
                 The number of characters of "timezone abbreviation strings" stored in the file.

同样 使用 info timezone 或 info tzset 使用 /etc/TZ 文件的格式,

你可能感兴趣的:(编程指导)