Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/time



    Date:        Fri, 21 Oct 2022 10:36:23 -0400
    From:        Jan Schaumann <jschauma%netmeister.org@localhost>
    Message-ID:  <Y1KuZ/McMBCevcQR%netmeister.org@localhost>


  | Perhaps like this?

Like that, yes, but as you wrote it isn't how it is actually
done I believe.

The order looks to be secs, mins, hours, month, day(of month).

There's no normalisation of the year (no invalid values to correct)
though the year can be adjusted when the month is adjusted.

That order is assuming that the system is using posix stretchy seconds,
rather than UTC (with leap seconds), but almost all NetBSD systems
work that way - if UTC is being used, then secs cannot be done first,
as until the rest of the data/time is known, it is unknown whether
the number of seconds permitted is 59 60 or 61.   With POSIX seconds
the secs/mins/hours correction order doesn't really matter, as there
are always 0..59 secs, 0..59 mins, and 0..23 hours, the rest of the
fields have no impact at all.

kre



Home | Main Index | Thread Index | Old Index