March 26, 2024
1:52 a.m.
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.