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 文件的格式,

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值