Home

TZif

TZif, short for Time Zone Information Format, is a binary file format used to store time zone data for the IANA Time Zone Database (tzdata). It is the mechanism by which Unix-like systems determine local time, daylight saving transitions, and related rules for any given region. TZif files are typically located in the zoneinfo directory, such as /usr/share/zoneinfo, and are read by standard time libraries to convert between UTC and local times.

A TZif file begins with the ASCII signature “TZif” and a version character, which identifies the layout

The practical result is that time library code can apply the most recent transition before a given

and
capabilities
of
the
data
(versions
include
1
and
later
2,
3,
4).
The
header
is
followed
by
a
series
of
data
blocks
that
describe
how
local
time
is
obtained.
The
blocks
include
transition
times
(epoch
seconds
indicating
when
a
change
occurs),
an
array
of
transition
types
that
point
to
a
list
of
time
types,
and
a
table
of
ttinfo
records
that
specify
each
type’s
UTC
offset,
whether
it
is
daylight
saving
time,
and
an
index
into
the
abbreviation
strings
for
display.
The
zone
abbreviation
strings
themselves
are
stored
in
a
separate
block.
In
newer
TZif
formats,
64-bit
times
are
used
to
extend
the
representable
range,
and
leap
second
data
may
be
included
in
separate
sections.
instant
and
use
the
corresponding
type
to
compute
the
correct
local
time.
TZif
provides
a
compact,
machine-readable
representation
of
the
rules
governing
time
zones
worldwide
and
is
the
de
facto
standard
used
by
many
operating
systems.