June 7, 2022
2:07 a.m.
On 6/6/22 18:23, enh wrote:
i think the safest choice for bionic is probably just "disable the new check and preserve the old behavior".
Yes, that sounds right. Come to think of it, that's simpler (and arguably better) on all platforms. That is, if you give strftime a format containing %s, you must also pass a struct tm that came from a successful localtime call; otherwise behavior is undefined. In the undefined case tzdb strftime can simply output (time_t)-1 for %s. Proposed patch attached and installed into the development repository. This doesn't affect tzdb itself, as tzdb never gets into this situation.