On 6/6/24 14:30, Bruno Haible wrote:
tzname is used in three places:
- time_rz,
This should be fixed to use strftime instead.
- parse-datetime,
Likewise. (This usage of tzname is simply wrong, by the way, but it can
be compatibly wrong.)
- nstrftime, c-nstrftime.
These are essentially the same module and tzname hacks should be
internal to it.
POSIX:2024 (p. 2310-2311) does not warn against these 3 variables.
That's a bug in POSIX and a fix is already in the pipeline
<https://austingroupbugs.net/view.php?id=1816>.
Will you also write to [email protected] ?
Eventually, sure. One thing at a time.
"tm_zone points to static storage and may be overridden on
subsequent calls to localtime(3) and similar functions (however,
this never happens under glibc)."
The actual lifetime in all implementations is that it's good at least
until you set TZ. Glibc extends this so that it's good forever.
Not covering the lifetime issue is also a bug in POSIX and I'm working
with the committee on getting it fixed.