Hi Paul,

Paul Eggert <egg...@cs.ucla.edu> writes:

> Yes, this is an iffy area in the mktime spec. I installed the attached
> further coreutils patch to try to avoid the iffy area.

Thanks, the test passes with that patch.

I guess non-existent times due to daylight savings were probably an
after thought when writing the mktime spec, and were only considered
when people started testing edge cases.

>From skimming the austin-group mailing list I think I found the POSIX
correction you mentioned [1]. Which is already a part of POSIX.1-2024
[2]:

    In order to allow applications to distinguish between a successful
    return of (time_t)-1 and an [EOVERFLOW] error, mktime() is required
    not to change tm_wday on error.

Just in case you think it is worth documenting somewhere.

Thanks,
Collin

[1] https://austingroupbugs.net/view.php?id=1614
[2] https://pubs.opengroup.org/onlinepubs/9799919799/functions/mktime.html

Reply via email to