public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* %z and %Z in strftime man page require clarification
@ 2022-07-28  8:16 Almaz Mingaleev
  2023-02-13  9:15 ` Almaz Mingaleev
  0 siblings, 1 reply; 11+ messages in thread
From: Almaz Mingaleev @ 2022-07-28  8:16 UTC (permalink / raw)
  To: mtk.manpages; +Cc: linux-man, Elliott Hughes

Hi Michael,
Current strftime specification in C language standard is not accurate.
It tells that tm_isdst is enough to find out time zone's offset. But
that's not true, for example Europe/Lisbon has changed [0] its
standard offset from 00:00 to 01:00 and back to 00:00, so an exact
date is needed to answer that.

To get correct answer with the current glibc tm struct should either
come from localtime or there should be a mktime call prior to
strftime. You can find a repro example and discussion here [1]. Paul
Eggert has proposed a fix to C standard [2].

Should man pages reflect that i.e. mention that there should be
localtime/mktime calls for %z and %Z?

Thanks,
Almaz

P.S. I am resending the email. My previous attempt was bounced back as
it wasn't TEXT/PLAIN.

[0] https://github.com/eggert/tz/blob/a249a0c64b2f87a24c7f1aab43056fb597c95b96/europe#L2400
[1] https://mm.icann.org/pipermail/tz/2022-July/031668.html
[2] https://mm.icann.org/pipermail/tz/2022-July/031674.html

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2023-02-28 14:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-28  8:16 %z and %Z in strftime man page require clarification Almaz Mingaleev
2023-02-13  9:15 ` Almaz Mingaleev
2023-02-13 16:31   ` enh
2023-02-15 17:21     ` Alejandro Colomar
2023-02-15 17:34       ` Almaz Mingaleev
2023-02-24 16:40         ` Almaz Mingaleev
2023-02-25  0:40           ` Alex Colomar
     [not found]         ` <CAJ0cOr99WV6fbdPj3t7QHG4QH0oHAPZb-8sJWYJ0SPMBBYc_Og@mail.gmail.com>
2023-02-25  1:11           ` Paul Eggert
2023-02-27  8:52             ` Almaz Mingaleev
2023-02-27 20:43               ` Paul Eggert
2023-02-28 14:32                 ` Almaz Mingaleev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox