[tz] mktime() clarification
Paul Eggert
eggert at cs.ucla.edu
Tue Mar 26 01:52:51 UTC 2024
On 3/25/24 12:16, Dag-Erling Smørgrav via tz wrote:
> it seems to me
> that the only reliable way to determine whether mktime() succeeded,
> within the bounds of the aforementioned standards, is to set tm_wday or
> tm_yday to an out-of-bounds value (e.g. -1) prior to calling mktime()
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.
I installed the attached proposed patch to the documentation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Document-how-to-detect-mktime-failure-reliably.patch
Type: text/x-patch
Size: 930 bytes
Desc: not available
URL: <https://mm.icann.org/pipermail/tz/attachments/20240325/d57259fa/0001-Document-how-to-detect-mktime-failure-reliably.patch>
More information about the tz
mailing list