Skip to content

Commit

Permalink
Update and/or clean up POSIX version info
Browse files Browse the repository at this point in the history
  • Loading branch information
eggert committed Apr 15, 2018
1 parent c073ba9 commit 7b01a16
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
12 changes: 3 additions & 9 deletions 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.
Expand Down Expand Up @@ -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__
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down
7 changes: 3 additions & 4 deletions localtime.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion theory.html
Expand Up @@ -68,7 +68,7 @@ <h2 id="scope">Scope of the <code><abbr>tz</abbr></code> database</h2>
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
Expand Down

0 comments on commit 7b01a16

Please sign in to comment.