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



Robert Elz <kre%munnari.OZ.AU@localhost> wrote:
>     Date:        Fri, 21 Oct 2022 03:05:15 +0000
>     From:        "Jan Schaumann" <jschauma%netbsd.org@localhost>
>     Message-ID:  <20221021030515.CDC9DFA90%cvs.NetBSD.org@localhost>
> 
>   | 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


Home | Main Index | Thread Index | Old Index