[Bug time/34480] mktime fails to determine DST for America/Vancouver from tzdata 2026b
aurelien at aurel32 dot net via Glibc-bugs <[email protected]> Tue, 04 Aug 2026 12:47:03 +0000
| Newsgroups | gmane.comp.lib.glibc.bugs |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://sourceware.org/bugzilla/show_bug.cgi?id=3D34480
--- Comment #4 from Aurelien Jarno <aurelien at aurel32 dot net> ---
(In reply to Florian Weimer from comment #3)
> (In reply to Aurelien Jarno from comment #0)
> > All that said, POSIX 2024 clarifies the mktime behaviour: when tm_isdst=
is
> > 0, the implementation should interpret the input as standard time and n=
ot
> > attempt to determine if DST is active. Maybe that is the correct fix he=
re.
>=20
> But what does that actually mean in this context?
>=20
> America/Vancouver has permanent DST. Does POSIX require that the time_t
> value produced is different for tm_isdst =3D=3D 0 and tm_isdst =3D=3D 1? =
To avoid
> producing a difference, mktime would have to determine whether DST is in
> effect, I think.
Quoting POSIX.1-2024:
"
If the timezone is one that includes Daylight Saving Time (DST) adjustments,
the value of tm_isdst in the tm structure controls whether or not mktime()
adjusts the calculated seconds since the Epoch value by the DST offset (aft=
er
it has made the timezone adjustment), as follows:
If tm_isdst is zero, mktime() shall not further adjust the seconds since
the Epoch by the DST offset.
If tm_isdst is positive, mktime() shall further adjust the seconds since
the Epoch by the DST offset.
If tm_isdst is negative, mktime() shall attempt to determine whether DS=
T is
in effect for the specified time; if it determines that DST is in effect it
shall produce the same result as an equivalent call with a positive tm_isdst
value, otherwise it shall produce the same result as an equivalent call wit=
h a
tm_isdst value of zero. If the broken-down time specifies a time that is ei=
ther
skipped over or repeated when a transition to or from DST occurs, it is
unspecified whether mktime() produces the same result as an equivalent call
with a positive tm_isdst value or as an equivalent call with a tm_isdst val=
ue
of zero.
"
I can try to implement that if it makes sense to do so.
--=20
You are receiving this mail because:
You are on the CC list for the bug.=