Module Name: src Committed By: jschauma Date: Fri Oct 21 03:05:15 UTC 2022
Modified Files: src/lib/libc/time: ctime.3 Log Message: Note normalizing behavior of mktime(3) using language from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/lib/libc/time/ctime.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libc/time/ctime.3 diff -u src/lib/libc/time/ctime.3:1.63 src/lib/libc/time/ctime.3:1.64 --- src/lib/libc/time/ctime.3:1.63 Tue Aug 16 11:07:40 2022 +++ src/lib/libc/time/ctime.3 Fri Oct 21 03:05:15 2022 @@ -1,8 +1,8 @@ -.\" $NetBSD: ctime.3,v 1.63 2022/08/16 11:07:40 christos Exp $ +.\" $NetBSD: ctime.3,v 1.64 2022/10/21 03:05:15 jschauma Exp $ .\" .\" XXX: License missing? .\" -.Dd August 16, 2022 +.Dd October 22, 2022 .Dt CTIME 3 .Os .Sh NAME @@ -253,7 +253,17 @@ and .Fa tm_yday components of the structure are ignored, and the original values of the other components are not restricted -to their normal ranges. +to their normal ranges and will be normalized, +if need be. +For example, +October 40 is changed into November 9, a +.Fa tm_hour +of \-1 means 1 hour before midnight, +.Fa tm_mday +of 0 means the day preceding the current month, and +.Fa tm_mon +of \-2 means 2 months before January of +.Fa tm_year . (A positive or zero value for .Fa tm_isdst causes