Re: nstrftime %c bug w.r.t. time zone

2024-02-09 Thread Bruno Haible
Paul Eggert wrote: > > This patch provides a workaround, and thus removes the test-nstrftime-2.sh > > failure at test-nstrftime.h:421. > > I was thinking of something a bit more general: temporarily set the time > zone before calling the underlying strftime, and reset it afterwards. > This of cou

Re: nstrftime %c bug w.r.t. time zone

2024-02-08 Thread Paul Eggert
On 2024-02-08 03:50, Bruno Haible wrote: This patch provides a workaround, and thus removes the test-nstrftime-2.sh failure at test-nstrftime.h:421. I was thinking of something a bit more general: temporarily set the time zone before calling the underlying strftime, and reset it afterwards. T

Re: nstrftime %c bug w.r.t. time zone

2024-02-08 Thread Bruno Haible
> 2024-02-08 Bruno Haible > > nstrtime, c-nstrftime: Fix %c directive's result on NetBSD, Solaris. > * lib/strftime.c (__strftime_internal): On NetBSD and Solaris, remove > the last word of the %c directive's result if it looks like a time zone. This patch adds a mention of t

Re: nstrftime %c bug w.r.t. time zone

2024-02-08 Thread Bruno Haible
I wrote: > time.in.h says: > > (timezone_t) NULL stands for UTC. > > However, nstrftime, on NetBSD 7 and Solaris 11, prints my local time zone > ("CET"), not "UTC" or "GMT", in this test program: This patch provides a workaround, and thus removes the test-nstrftime-2.sh failure at test-nstrft

nstrftime %c bug w.r.t. time zone

2024-02-07 Thread Bruno Haible
Hi Paul, time.in.h says: (timezone_t) NULL stands for UTC. However, nstrftime, on NetBSD 7 and Solaris 11, prints my local time zone ("CET"), not "UTC" or "GMT", in this test program: == foo.c = #include #include #include #inc