Robert Elz <k...@munnari.oz.au> wrote: > Date: Fri, 21 Oct 2022 03:05:15 +0000 > From: "Jan Schaumann" <jscha...@netbsd.org> > Message-ID: <20221021030515.cdc9df...@cvs.netbsd.org> > > | Note normalizing behavior of mktime(3) using language from FreeBSD. > > If we are going to start specifying what happens (how the struct tm > is normalised) then we really also need to specify in which order > the fields are corrected. It makes a difference.
Perhaps like this? Index: ctime.3 =================================================================== RCS file: /cvsroot/src/lib/libc/time/ctime.3,v retrieving revision 1.65 diff -u -p -r1.65 ctime.3 --- ctime.3 21 Oct 2022 03:08:29 -0000 1.65 +++ ctime.3 21 Oct 2022 14:34:39 -0000 @@ -264,6 +264,11 @@ of 0 means the day preceding the current .Fa tm_mon of \-2 means 2 months before January of .Fa tm_year . +This normalization is done in order from +.Fa tm_sec +to +.Fa tm_year , +possibly leading to cascading values. (A positive or zero value for .Fa tm_isdst causes