2013-03-10 09:28:48 +00:00
|
|
|
.\" %%%LICENSE_START(PUBLIC_DOMAIN)
|
2004-11-03 13:51:07 +00:00
|
|
|
.\" This file is in the public domain, so clarified as of
|
|
|
|
.\" 1996-06-05 by Arthur David Olson <arthur_david_olson@nih.gov>.
|
2013-03-10 09:28:48 +00:00
|
|
|
.\" %%%LICENSE_END
|
ldd.1, capget.2, clone.2, create_module.2, fallocate.2, futex.2, get_kernel_syms.2, get_thread_area.2, getcpu.2, getitimer.2, getpid.2, io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2, ioctl_list.2, mkdir.2, mknod.2, pciconfig_read.2, pivot_root.2, posix_fadvise.2, query_module.2, sendfile.2, set_thread_area.2, setns.2, unshare.2, __setfpucw.3, a64l.3, addseverity.3, argz_add.3, bindresvport.3, cabs.3, cacos.3, cacosh.3, canonicalize_file_name.3, carg.3, casin.3, casinh.3, catan.3, catanh.3, ccos.3, ccosh.3, cerf.3, cexp.3, cexp2.3, cimag.3, clog.3, clog10.3, clog2.3, cmsg.3, conj.3, cpow.3, cproj.3, creal.3, csin.3, csinh.3, csqrt.3, ctan.3, ctanh.3, des_crypt.3, envz_add.3, fdim.3, fma.3, fmax.3, fmemopen.3, fmin.3, fmtmsg.3, fpclassify.3, gamma.3, getpt.3, getrpcent.3, getrpcport.3, getttyent.3, isgreater.3, key_setsecret.3, lgamma.3, malloc_hook.3, mempcpy.3, nan.3, netlink.3, nextafter.3, putgrent.3, remove.3, remquo.3, rpc.3, rtime.3, rtnetlink.3, setaliasent.3, setnetgrent.3, signbit.3, significand.3, sincos.3, stdin.3, tgamma.3, xcrypt.3, xdr.3, cciss.4, hpsa.4, mouse.4, pts.4, sk98lin.4, tty_ioctl.4, wavelan.4, hosts.equiv.5, rpc.5, tzfile.5, boot.7, complex.7, ddp.7, fifo.7, futex.7, icmp.7, ip.7, ipv6.7, netdevice.7, netlink.7, packet.7, raw.7, rtnetlink.7, socket.7, tcp.7, udp.7, unix.7, x25.7, sync.8: Global fix: Put copyright info at top of page, followed by blank line and LICENSE
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2013-03-10 09:29:51 +00:00
|
|
|
.\"
|
getent.1, iconv.1, ldd.1, locale.1, localedef.1, memusage.1, memusagestat.1, pldd.1, sprof.1, time.1, _syscall.2, accept.2, add_key.2, adjtimex.2, bind.2, bpf.2, capget.2, chown.2, chroot.2, clock_getres.2, clone.2, connect.2, copy_file_range.2, epoll_ctl.2, epoll_wait.2, eventfd.2, fanotify_init.2, fanotify_mark.2, fcntl.2, fsync.2, futex.2, getcpu.2, getdents.2, getgid.2, getgroups.2, getpid.2, gettid.2, gettimeofday.2, getuid.2, getxattr.2, inotify_add_watch.2, inotify_init.2, ioctl_fat.2, ioctl_ns.2, ioctl_userfaultfd.2, ioprio_set.2, kcmp.2, kexec_load.2, keyctl.2, listxattr.2, lseek.2, madvise.2, memfd_create.2, migrate_pages.2, mount.2, mprotect.2, mremap.2, msgctl.2, msgop.2, nfsservctl.2, open_by_handle_at.2, perf_event_open.2, pipe.2, pivot_root.2, pkey_alloc.2, poll.2, posix_fadvise.2, prctl.2, readahead.2, readdir.2, readlink.2, reboot.2, recvmmsg.2, removexattr.2, rename.2, request_key.2, s390_guarded_storage.2, s390_runtime_instr.2, s390_sthyi.2, sched_setaffinity.2, sched_setattr.2, sched_setparam.2, seccomp.2, select.2, select_tut.2, semctl.2, sendmmsg.2, set_thread_area.2, setgid.2, setns.2, setuid.2, setxattr.2, shmctl.2, sigaction.2, signalfd.2, sigsuspend.2, socket.2, socketpair.2, spu_run.2, stat.2, statx.2, subpage_prot.2, syscalls.2, sysctl.2, tee.2, timer_create.2, timerfd_create.2, truncate.2, uname.2, unshare.2, userfaultfd.2, ustat.2, vmsplice.2, write.2, CPU_SET.3, __ppc_get_timebase.3, alloca.3, argz_add.3, asprintf.3, backtrace.3, basename.3, bsd_signal.3, bstring.3, bswap.3, bzero.3, cacos.3, cacosh.3, catan.3, catanh.3, catgets.3, clock_getcpuclockid.3, cmsg.3, confstr.3, ctermid.3, ctime.3, des_crypt.3, dl_iterate_phdr.3, dlinfo.3, dlsym.3, duplocale.3, end.3, endian.3, errno.3, exec.3, exit.3, ferror.3, fgetws.3, fmemopen.3, fnmatch.3, fopencookie.3, fputws.3, frexp.3, ftw.3, get_nprocs_conf.3, get_phys_pages.3, getaddrinfo.3, getaddrinfo_a.3, getdate.3, getgrouplist.3, getifaddrs.3, getline.3, getlogin.3, getmntent.3, getnameinfo.3, getopt.3, getpass.3, getprotoent_r.3, getpwnam.3, getservent_r.3, getsubopt.3, glob.3, gnu_get_libc_version.3, hsearch.3, if_nameindex.3, index.3, inet.3, inet_net_pton.3, inet_pton.3, insque.3, isatty.3, iswblank.3, iswspace.3, lockf.3, makecontext.3, mallinfo.3, malloc.3, malloc_hook.3, malloc_info.3, mallopt.3, matherr.3, mbrtowc.3, mbsnrtowcs.3, mbsrtowcs.3, mbstowcs.3, mbtowc.3, mcheck.3, memchr.3, mq_getattr.3, mq_notify.3, newlocale.3, nl_langinfo.3, offsetof.3, perror.3, posix_spawn.3, printf.3, pthread_attr_init.3, pthread_cancel.3, pthread_cleanup_push.3, pthread_getattr_default_np.3, pthread_getattr_np.3, pthread_getcpuclockid.3, pthread_mutexattr_setrobust.3, pthread_rwlockattr_setkind_np.3, pthread_setaffinity_np.3, pthread_setname_np.3, pthread_setschedparam.3, pthread_sigmask.3, putenv.3, qsort.3, rand.3, random.3, readdir.3, regex.3, resolver.3, rpmatch.3, rtime.3, scanf.3, sem_wait.3, setaliasent.3, setbuf.3, stpcpy.3, stpncpy.3, strcat.3, strchr.3, strcmp.3, strcpy.3, strdup.3, strerror.3, strfromd.3, strfry.3, strftime.3, string.3, strlen.3, strnlen.3, strsep.3, strstr.3, strtok.3, strtol.3, strtoul.3, strverscmp.3, strxfrm.3, system.3, termios.3, trunc.3, wcpcpy.3, wcpncpy.3, wcrtomb.3, wcscat.3, wcscpy.3, wcslen.3, wcsncat.3, wcsncmp.3, wcsncpy.3, wcsnlen.3, wcsnrtombs.3, wcsrtombs.3, wcsstr.3, wcstok.3, wcstombs.3, wcwidth.3, wprintf.3, xcrypt.3, console_codes.4, dsp56k.4, full.4, initrd.4, lirc.4, loop.4, st.4, tty.4, vcs.4, charmap.5, core.5, host.conf.5, locale.5, proc.5, repertoiremap.5, resolv.conf.5, termcap.5, tmpfs.5, tzfile.5, aio.7, capabilities.7, cgroup_namespaces.7, cgroups.7, charsets.7, complex.7, epoll.7, fanotify.7, feature_test_macros.7, inotify.7, ip.7, locale.7, man-pages.7, man.7, namespaces.7, pid_namespaces.7, pkeys.7, pthreads.7, rtld-audit.7, sched.7, signal.7, sock_diag.7, socket.7, tcp.7, udp.7, unicode.7, user_namespaces.7, utf-8.7, zdump.8, zic.8: tstamp
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2019-03-06 14:11:03 +00:00
|
|
|
.TH TZFILE 5 2019-03-06 "" "Linux Programmer's Manual"
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH NAME
|
2017-08-11 10:26:01 +00:00
|
|
|
tzfile \- timezone information
|
2004-11-03 13:51:07 +00:00
|
|
|
.SH DESCRIPTION
|
2017-08-05 03:25:21 +00:00
|
|
|
.ie '\(lq'' .ds lq \&"\"
|
|
|
|
.el .ds lq \(lq\"
|
|
|
|
.ie '\(rq'' .ds rq \&"\"
|
|
|
|
.el .ds rq \(rq\"
|
|
|
|
.de q
|
|
|
|
\\$3\*(lq\\$1\*(rq\\$2
|
|
|
|
..
|
2017-08-11 10:26:01 +00:00
|
|
|
The timezone information files used by
|
2017-08-05 03:25:21 +00:00
|
|
|
.BR tzset (3)
|
|
|
|
are typically found under a directory with a name like
|
2012-05-03 18:52:26 +00:00
|
|
|
.IR /usr/share/zoneinfo .
|
2017-08-05 03:25:21 +00:00
|
|
|
These files begin with a 44-byte header containing the following fields:
|
|
|
|
.IP * 2
|
|
|
|
The magic four-byte ASCII sequence
|
|
|
|
.q "TZif"
|
2017-08-11 10:26:01 +00:00
|
|
|
identifies the file as a timezone information file.
|
2015-05-02 07:59:01 +00:00
|
|
|
.IP *
|
2017-08-05 03:25:21 +00:00
|
|
|
A byte identifying the version of the file's format
|
|
|
|
(as of 2017, either an ASCII NUL, or
|
|
|
|
.q "2",
|
|
|
|
or
|
|
|
|
.q "3" ).
|
2015-05-02 07:59:01 +00:00
|
|
|
.IP *
|
|
|
|
Fifteen bytes containing zeros reserved for future use.
|
|
|
|
.IP *
|
2017-08-05 03:25:21 +00:00
|
|
|
Six four-byte integer values
|
|
|
|
written in a standard byte order
|
2004-11-03 13:51:07 +00:00
|
|
|
(the high-order byte of the value is written first).
|
|
|
|
These values are,
|
|
|
|
in order:
|
2015-05-02 07:59:01 +00:00
|
|
|
.RS
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.I tzh_ttisgmtcnt
|
2017-08-05 03:25:21 +00:00
|
|
|
The number of UT/local indicators stored in the file.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.I tzh_ttisstdcnt
|
|
|
|
The number of standard/wall indicators stored in the file.
|
|
|
|
.TP
|
|
|
|
.I tzh_leapcnt
|
2017-08-05 03:25:21 +00:00
|
|
|
The number of leap seconds for which data entries are stored in the file.
|
2004-11-03 13:51:07 +00:00
|
|
|
.TP
|
|
|
|
.I tzh_timecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
The number of transition times for which data entries are stored
|
2004-11-03 13:51:07 +00:00
|
|
|
in the file.
|
|
|
|
.TP
|
|
|
|
.I tzh_typecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
The number of local time types for which data entries are stored
|
2004-11-03 13:51:07 +00:00
|
|
|
in the file (must not be zero).
|
|
|
|
.TP
|
|
|
|
.I tzh_charcnt
|
2018-06-27 19:52:35 +00:00
|
|
|
The number of bytes of time zone abbreviation strings
|
2004-11-03 13:51:07 +00:00
|
|
|
stored in the file.
|
2015-05-02 07:59:01 +00:00
|
|
|
.RE
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
2017-08-05 03:25:21 +00:00
|
|
|
The above header is followed by the following fields, whose lengths
|
2018-06-27 19:52:35 +00:00
|
|
|
depend on the contents of the header:
|
2017-08-05 03:25:21 +00:00
|
|
|
.IP * 2
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tzh_timecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
four-byte signed integer values sorted in ascending order.
|
|
|
|
These values are written in standard byte order.
|
2004-11-03 13:51:07 +00:00
|
|
|
Each is used as a transition time (as returned by
|
|
|
|
.BR time (2))
|
|
|
|
at which the rules for computing local time change.
|
2017-08-05 03:25:21 +00:00
|
|
|
.IP *
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tzh_timecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
one-byte unsigned integer values;
|
2018-06-27 19:52:35 +00:00
|
|
|
each one but the last tells which of the different types of local time types
|
2017-08-05 03:25:21 +00:00
|
|
|
described in the file is associated with the time period
|
2018-06-27 19:52:35 +00:00
|
|
|
starting with the same-indexed transition time
|
|
|
|
and continuing up to but not including the next transition time.
|
|
|
|
(The last time type is present only for consistency checking with the
|
|
|
|
POSIX-style TZ string described below.)
|
2017-08-05 03:25:21 +00:00
|
|
|
These values serve as indices into the next field.
|
|
|
|
.IP *
|
2010-08-31 05:49:34 +00:00
|
|
|
.I tzh_typecnt
|
2017-08-05 03:25:21 +00:00
|
|
|
.I ttinfo
|
|
|
|
entries, each defined as follows:
|
2018-06-27 19:52:35 +00:00
|
|
|
.in +.5i
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
.ta .5i +\w'unsigned char\0\0'u
|
2004-11-03 13:51:07 +00:00
|
|
|
struct ttinfo {
|
2018-06-27 19:52:35 +00:00
|
|
|
int32_t tt_gmtoff;
|
|
|
|
unsigned char tt_isdst;
|
|
|
|
unsigned char tt_abbrind;
|
2004-11-03 13:51:07 +00:00
|
|
|
};
|
2018-06-27 19:52:35 +00:00
|
|
|
.in -.5i
|
|
|
|
.fi
|
|
|
|
.sp
|
2017-08-05 03:25:21 +00:00
|
|
|
Each structure is written as a four-byte signed integer value for
|
|
|
|
.IR tt_gmtoff ,
|
2004-11-03 13:51:07 +00:00
|
|
|
in a standard byte order, followed by a one-byte value for
|
|
|
|
.I tt_isdst
|
|
|
|
and a one-byte value for
|
|
|
|
.IR tt_abbrind .
|
|
|
|
In each structure,
|
|
|
|
.I tt_gmtoff
|
2017-08-05 03:25:21 +00:00
|
|
|
gives the number of seconds to be added to UT,
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tt_isdst
|
|
|
|
tells whether
|
|
|
|
.I tm_isdst
|
|
|
|
should be set by
|
2017-08-05 03:25:21 +00:00
|
|
|
.BR localtime (3)
|
2004-11-03 13:51:07 +00:00
|
|
|
and
|
|
|
|
.I tt_abbrind
|
2018-06-27 19:52:35 +00:00
|
|
|
serves as an index into the array of time zone abbreviation bytes
|
2004-11-03 13:51:07 +00:00
|
|
|
that follow the
|
|
|
|
.I ttinfo
|
|
|
|
structure(s) in the file.
|
2017-08-05 03:25:21 +00:00
|
|
|
.IP *
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tzh_leapcnt
|
|
|
|
pairs of four-byte values, written in standard byte order;
|
2017-08-05 03:25:21 +00:00
|
|
|
the first value of each pair gives the nonnegative time
|
2004-11-03 13:51:07 +00:00
|
|
|
(as returned by
|
|
|
|
.BR time (2))
|
|
|
|
at which a leap second occurs;
|
|
|
|
the second gives the
|
|
|
|
.I total
|
2017-08-05 03:25:21 +00:00
|
|
|
number of leap seconds to be applied during the time period
|
|
|
|
starting at the given time.
|
2004-11-03 13:51:07 +00:00
|
|
|
The pairs of values are sorted in ascending order by time.
|
2017-08-05 03:25:21 +00:00
|
|
|
Each transition is for one leap second, either positive or negative;
|
|
|
|
transitions always separated by at least 28 days minus 1 second.
|
|
|
|
.IP *
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tzh_ttisstdcnt
|
|
|
|
standard/wall indicators, each stored as a one-byte value;
|
|
|
|
they tell whether the transition times associated with local time types
|
|
|
|
were specified as standard time or wall clock time,
|
2017-08-11 10:26:01 +00:00
|
|
|
and are used when a timezone file is used in handling POSIX-style
|
|
|
|
timezone environment variables.
|
2017-08-05 03:25:21 +00:00
|
|
|
.IP *
|
2004-11-03 13:51:07 +00:00
|
|
|
.I tzh_ttisgmtcnt
|
2017-08-05 03:25:21 +00:00
|
|
|
UT/local indicators, each stored as a one-byte value;
|
2004-11-03 13:51:07 +00:00
|
|
|
they tell whether the transition times associated with local time types
|
2017-08-05 03:25:21 +00:00
|
|
|
were specified as UT or local time,
|
2017-08-11 10:26:01 +00:00
|
|
|
and are used when a timezone file is used in handling POSIX-style
|
|
|
|
timezone environment variables.
|
2004-11-03 13:51:07 +00:00
|
|
|
.PP
|
2017-08-05 03:25:21 +00:00
|
|
|
The
|
2010-08-31 05:49:34 +00:00
|
|
|
.BR localtime (3)
|
2017-08-05 03:25:21 +00:00
|
|
|
function
|
2004-11-03 13:51:07 +00:00
|
|
|
uses the first standard-time
|
|
|
|
.I ttinfo
|
|
|
|
structure in the file
|
|
|
|
(or simply the first
|
|
|
|
.I ttinfo
|
|
|
|
structure in the absence of a standard-time structure)
|
|
|
|
if either
|
|
|
|
.I tzh_timecnt
|
|
|
|
is zero or the time argument is less than the first transition time recorded
|
|
|
|
in the file.
|
2015-05-02 07:54:33 +00:00
|
|
|
.SS Version 2 format
|
2017-08-11 10:26:01 +00:00
|
|
|
For version-2-format timezone files,
|
2017-08-05 03:25:21 +00:00
|
|
|
the above header and data are followed by a second header and data,
|
2010-08-31 05:49:34 +00:00
|
|
|
identical in format except that
|
2017-08-05 03:25:21 +00:00
|
|
|
eight bytes are used for each transition time or leap second time.
|
|
|
|
(Leap second counts remain four bytes.)
|
2010-08-31 05:49:34 +00:00
|
|
|
After the second header and data comes a newline-enclosed,
|
|
|
|
POSIX-TZ-environment-variable-style string for use in handling instants
|
|
|
|
after the last transition time stored in the file
|
2018-06-27 19:52:35 +00:00
|
|
|
or for all instants if the file has no transitions.
|
|
|
|
The POSIX-style TZ string is empty (i.e., nothing between the newlines)
|
|
|
|
if there is no POSIX representation for such instants.
|
|
|
|
If nonempty, the POSIX-style TZ string must agree with the local time
|
|
|
|
type after the last transition time if present in the eight-byte data;
|
|
|
|
for example, given the string
|
2017-08-05 03:25:21 +00:00
|
|
|
.q "WET0WEST,M3.5.0,M10.5.0/3"
|
|
|
|
then if a last transition time is in July, the transition's local time
|
|
|
|
type must specify a daylight-saving time abbreviated
|
|
|
|
.q "WEST"
|
|
|
|
that is one hour east of UT.
|
2018-06-27 19:52:35 +00:00
|
|
|
Also, if there is at least one transition, time type 0 is associated
|
|
|
|
with the time period from the indefinite past up to but not including
|
|
|
|
the earliest transition time.
|
2017-08-05 03:25:21 +00:00
|
|
|
.SS Version 3 format
|
2017-08-11 10:26:01 +00:00
|
|
|
For version-3-format timezone files, the POSIX-TZ-style string may
|
2017-08-05 03:25:21 +00:00
|
|
|
use two minor extensions to the POSIX TZ format, as described in
|
2017-08-12 09:20:10 +00:00
|
|
|
.BR newtzset (3).
|
2017-08-05 03:25:21 +00:00
|
|
|
First, the hours part of its transition times may be signed and range from
|
2019-02-27 09:37:04 +00:00
|
|
|
\-167 through 167 instead of the POSIX-required unsigned values
|
2017-08-11 10:26:01 +00:00
|
|
|
from 0 through 24.
|
|
|
|
Second, DST is in effect all year if it starts
|
2017-08-05 03:25:21 +00:00
|
|
|
January 1 at 00:00 and ends December 31 at 24:00 plus the difference
|
|
|
|
between daylight saving and standard time.
|
2015-05-02 07:54:33 +00:00
|
|
|
.PP
|
2017-08-05 03:25:21 +00:00
|
|
|
Future changes to the format may append more data.
|
2010-08-31 05:49:34 +00:00
|
|
|
.SH SEE ALSO
|
2017-08-05 03:25:21 +00:00
|
|
|
.BR time (2),
|
|
|
|
.BR localtime (3),
|
2012-05-03 18:47:45 +00:00
|
|
|
.BR tzset (3),
|
2012-05-03 18:56:57 +00:00
|
|
|
.BR tzselect (8),
|
2017-08-05 03:25:21 +00:00
|
|
|
.BR zdump (8),
|
|
|
|
.BR zic (8)
|
|
|
|
.\" This file is in the public domain, so clarified as of
|
|
|
|
.\" 1996-06-05 by Arthur David Olson.
|