Home

tzname2

tzname2 is a term used in some software libraries to refer to an additional time zone name string that sits beyond the standard tzname array defined by POSIX time.h. It is not part of the POSIX standard, and its presence, semantics, and naming vary between implementations. As a result, tzname2 is not portable across platforms and should not be relied upon for cross‑platform code.

In typical C or C++ time handling, the standard tzname variable is an array of two strings

Usage considerations include portability and compatibility. Since tzname2 is nonstandard, code that uses it may fail

See also: tzname, time.h, struct tm, IANA time zone database, time zone abbreviations.

representing
the
standard
time
and
daylight
saving
time
abbreviations
for
the
current
locale.
Some
libraries
or
applications
extend
this
concept
with
tzname2
to
store
a
secondary
display
name,
a
long
form
of
the
zone
name,
an
alias,
or
a
locale-specific
label.
When
tzname2
appears,
its
exact
contents
and
purpose
are
determined
by
the
library,
not
by
the
C
or
POSIX
specifications.
to
compile
or
run
on
platforms
that
do
not
provide
it.
Developers
who
need
robust
time
zone
information
are
generally
advised
to
rely
on
the
IANA
time
zone
database
(zone
IDs
like
America/New_York)
and
formatting
APIs,
rather
than
nonstandard
extensions
such
as
tzname2.
If
tzname2
is
encountered
in
a
project,
it
is
important
to
consult
the
specific
library’s
documentation
to
understand
its
intended
meaning,
storage,
and
access
patterns.