March 26, 2024
2:02 a.m.
Paul Eggert via tz <tz@iana.org> writes:
That's what I do, and it works portably on all platforms I know of. In contrast, I doubt whether the errno=0 trick is portable.
Thank you. The errno=0 trick does not work with tzcode since timesub() can set errno to EOVERFLOW and time2sub() will adjust and recover, cf. https://github.com/eggert/tz/blob/2024a/localtime.c#L2060-L2064 and the elsewhere in this thread. DES -- Dag-Erling Smørgrav - des@des.no