%z and %Z in strftime man page require clarification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux