Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/time Note normalizing behavior of mktime(3) using l...



details:   https://anonhg.NetBSD.org/src/rev/f6236b3fb1a0
branches:  trunk
changeset: 371959:f6236b3fb1a0
user:      jschauma <jschauma%NetBSD.org@localhost>
date:      Fri Oct 21 03:05:15 2022 +0000

description:
Note normalizing behavior of mktime(3) using language from FreeBSD.

diffstat:

 lib/libc/time/ctime.3 |  16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 5f6c295b9998 -r f6236b3fb1a0 lib/libc/time/ctime.3
--- a/lib/libc/time/ctime.3     Thu Oct 20 11:38:21 2022 +0000
+++ b/lib/libc/time/ctime.3     Fri Oct 21 03:05:15 2022 +0000
@@ -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 @@
 .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



Home | Main Index | Thread Index | Old Index