[tz] [PROPOSED] Update and/or clean up POSIX version info

Paul Eggert eggert at cs.ucla.edu
Sun Apr 15 18:04:27 UTC 2018


---
 asctime.c   | 12 +++---------
 localtime.c |  7 +++----
 theory.html |  2 +-
 3 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/asctime.c b/asctime.c
index a55f785..56c54b3 100644
--- a/asctime.c
+++ b/asctime.c
@@ -1,3 +1,5 @@
+/* asctime and asctime_r a la POSIX and ISO C, except pad years before 1000.  */
+
 /*
 ** This file is in the public domain, so clarified as of
 ** 1996-06-05 by Arthur David Olson.
@@ -29,7 +31,7 @@
 ** leading zeroes to get the newline in the traditional place.
 ** The -4 ensures that we get four characters of output even if
 ** we call a strftime variant that produces fewer characters for some years.
-** The ISO C 1999 and POSIX 1003.1-2004 standards prohibit padding the year,
+** The ISO C and POSIX standards prohibit padding the year,
 ** but many implementations pad anyway; most likely the standards are buggy.
 */
 #ifdef __GNUC__
@@ -64,10 +66,6 @@
 
 static char	buf_asctime[MAX_ASCTIME_BUF_SIZE];
 
-/*
-** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition.
-*/
-
 char *
 asctime_r(register const struct tm *timeptr, char *buf)
 {
@@ -117,10 +115,6 @@ asctime_r(register const struct tm *timeptr, char *buf)
 	}
 }
 
-/*
-** A la ISO/IEC 9945-1, ANSI/IEEE Std 1003.1, 2004 Edition.
-*/
-
 char *
 asctime(register const struct tm *timeptr)
 {
diff --git a/localtime.c b/localtime.c
index b6b82bb..5b5a5b1 100644
--- a/localtime.c
+++ b/localtime.c
@@ -88,9 +88,8 @@ static const char	gmt[] = "GMT";
 /*
 ** The DST rules to use if TZ has no rules and we can't load TZDEFRULES.
 ** Default to US rules as of 2017-05-07.
-** POSIX 1003.1 section 8.1.1 says that the default DST rules are
-** implementation dependent; for historical reasons, US rules are a
-** common default.
+** POSIX does not specify the default DST rules;
+** for historical reasons, US rules are a common default.
 */
 #ifndef TZDEFRULESTRING
 #define TZDEFRULESTRING ",M3.2.0,M11.1.0"
@@ -2211,7 +2210,7 @@ timeoff(struct tm *tmp, long offset)
 #ifdef STD_INSPIRED
 
 /*
-** IEEE Std 1003.1-1988 (POSIX) legislates that 536457599
+** IEEE Std 1003.1 (POSIX) says that 536457599
 ** shall correspond to "Wed Dec 31 23:59:59 UTC 1986", which
 ** is not the case if we are accounting for leap seconds.
 ** So, we provide the following conversion routines for use
diff --git a/theory.html b/theory.html
index b27b212..fc2102b 100644
--- a/theory.html
+++ b/theory.html
@@ -68,7 +68,7 @@ standard for <a
 href="https://en.wikipedia.org/wiki/Unix">UNIX</a>-like systems.
 As of this writing, the current edition of POSIX is: <a
 href="http://pubs.opengroup.org/onlinepubs/9699919799/"> The Open
-Group Base Specifications Issue 7</a>, IEEE Std 1003.1-2008, 2016
+Group Base Specifications Issue 7</a>, IEEE Std 1003.1-2017, 2018
 Edition.
 Because the database's scope encompasses real-world changes to civil
 timekeeping, its model for describing time is more complex than the
-- 
2.7.4



More information about the tz mailing list