Home

isdst

isdst is a shorthand commonly used in computing to refer to daylight saving time status. In practice, it most often denotes a flag that indicates whether daylight saving time is in effect for a given moment, and is closely associated with the tm_isdst field of the standard C struct tm.

In the C programming interface, struct tm contains an integer field named tm_isdst. The value indicates the

The actual DST rules are defined by the system’s time zone database, such as the IANA Time

Limitations and considerations include the fact that tm_isdst may be set to -1 to indicate that the

Name variations exist across languages and libraries; while isdst is a common shorthand, the corresponding field

DST
status:
typically
1
if
daylight
saving
time
is
in
effect,
0
if
it
is
not,
and
-1
when
the
information
is
unavailable
or
not
applicable.
This
flag
is
used
by
time
conversion
functions
such
as
localtime
and
mktime
to
apply
the
correct
time
offset
according
to
the
local
time
zone
rules.
Zone
Database.
Because
DST
rules
can
change
and
vary
by
region,
the
tm_isdst
value
may
differ
between
platforms
or
contexts,
and
some
times
may
be
ambiguous
during
DST
transition
moments.
DST
status
could
not
be
determined,
and
relying
solely
on
the
flag
can
be
unsafe
if
time
zone
data
is
outdated
or
incomplete.
For
portable
or
robust
time
handling,
developers
often
rely
on
higher-level
time
zone
libraries
or
system
facilities
that
manage
DST
transitions
and
updates.
or
indicator
is
typically
implemented
as
tm_isdst
within
the
struct
tm.
See
also
daylight
saving
time,
time
zone
databases,
localtime,
mktime,
and
struct
tm.