[tz] Invalid tm handling in %s pattern in strftime
enh at google.com
Tue Jun 7 21:58:02 UTC 2022
On Mon, Jun 6, 2022 at 7:07 PM Paul Eggert <eggert at cs.ucla.edu> wrote:
> 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.
awesome, thanks! not having to keep a diff relative to upstream tzcode is
great. (it's the large number of diffs we have so that tzdata can be one
big file rather than lots of little files that got us into this mess where
we're so far behind ToT in the first place!)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the tz