Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src correct tm_sec range to be [0-60]
details: https://anonhg.NetBSD.org/src/rev/452fc2a06b09
branches: trunk
changeset: 371981:452fc2a06b09
user: jschauma <jschauma%NetBSD.org@localhost>
date: Sun Oct 23 15:43:40 2022 +0000
description:
correct tm_sec range to be [0-60]
The previous range introduced in time.h rev1.14 was supposed to account
for a mystical "double leap second", which ultimately never could exist
and was a mistaken interpretation from an early ISO C standard whereby
the possibility of two leap seconds within a year was erroneously
interpreted to mean that two leap seconds could occur at once.
diffstat:
include/time.h | 4 ++--
share/man/man3/tm.3 | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 65016e160c76 -r 452fc2a06b09 include/time.h
--- a/include/time.h Sun Oct 23 11:06:37 2022 +0000
+++ b/include/time.h Sun Oct 23 15:43:40 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: time.h,v 1.47 2016/10/04 09:41:41 kamil Exp $ */
+/* $NetBSD: time.h,v 1.48 2022/10/23 15:43:40 jschauma Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -73,7 +73,7 @@
#define CLOCKS_PER_SEC 100
struct tm {
- int tm_sec; /* seconds after the minute [0-61] */
+ int tm_sec; /* seconds after the minute [0-60] */
int tm_min; /* minutes after the hour [0-59] */
int tm_hour; /* hours since midnight [0-23] */
int tm_mday; /* day of the month [1-31] */
diff -r 65016e160c76 -r 452fc2a06b09 share/man/man3/tm.3
--- a/share/man/man3/tm.3 Sun Oct 23 11:06:37 2022 +0000
+++ b/share/man/man3/tm.3 Sun Oct 23 15:43:40 2022 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: tm.3,v 1.4 2011/04/14 05:45:34 jruoho Exp $
+.\" $NetBSD: tm.3,v 1.5 2022/10/23 15:43:40 jschauma Exp $
.\"
.\" Copyright (c) 2011 Jukka Ruohonen <jruohonen%iki.fi@localhost>
.\" All rights reserved.
@@ -42,7 +42,7 @@
.Bl -column -offset indent \
"Type" "Field " "Months since January 1 " "Range "
.It Sy Type Ta Sy Field Ta Sy Represents Ta Sy Range
-.It Vt int Ta Va tm_sec Ta Seconds Ta [0, 61]
+.It Vt int Ta Va tm_sec Ta Seconds Ta [0, 60]
.It Vt int Ta Va tm_min Ta Minutes Ta [0, 59]
.It Vt int Ta Va tm_hour Ta Hours since midnight Ta [0, 23]
.It Vt int Ta Va tm_mday Ta Day of the month Ta [1, 31]
Home |
Main Index |
Thread Index |
Old Index