Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/time Release 2018i - 2018-12-30 11:05:43 -0800



details:   https://anonhg.NetBSD.org/src/rev/c6b152a9ce06
branches:  trunk
changeset: 447121:c6b152a9ce06
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jan 01 03:04:56 2019 +0000

description:
Release 2018i - 2018-12-30 11:05:43 -0800

  Briefly:
    S?o Tom? and Pr?ncipe switches from +01 to +00 on 2019-01-01.

  Changes to future timestamps

    Due to a change in government, S?o Tom? and Pr?ncipe switches back
    from +01 to +00 on 2019-01-01 at 02:00.  (Thanks to Vadim
    Nasardinov and Michael Deckers.)


Release 2018h - 2018-12-23 17:59:32 -0800

  Briefly:
    Qyzylorda, Kazakhstan moved from +06 to +05 on 2018-12-21.
    New zone Asia/Qostanay because Qostanay, Kazakhstan didn't move.
    Metlakatla, Alaska observes PST this winter only.
    Guess Morocco will continue to adjust clocks around Ramadan.
    Add predictions for Iran from 2038 through 2090.

  Changes to future timestamps

    Guess that Morocco will continue to fall back just before and
    spring forward just after Ramadan, the practice since 2012.
    (Thanks to Maamar Abdelkader.)  This means Morocco will observe
    negative DST during Ramadan in main and vanguard formats, and in
    rearguard format it stays in the +00 timezone and observes
    ordinary DST in all months other than Ramadan.  As before, extend
    this guesswork to the year 2037.  As a consequence, Morocco is
    scheduled to observe three DST transitions in some Gregorian years
    (e.g., 2033) due to the mismatch between the Gregorian and Islamic
    calendars.

    The table of exact transitions for Iranian DST has been extended.
    It formerly cut off before the year 2038 in a nod to 32-bit time_t.
    It now cuts off before 2091 as there is doubt about how the Persian
    calendar will treat 2091.  This change predicts DST transitions in
    2038-9, 2042-3, and 2046-7 to occur one day later than previously
    predicted.  As before, post-cutoff transitions are approximated.

  Changes to past and future timestamps

    Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
    +05 on 2018-12-21.  This is a zone split as Qostanay (aka
    Kostanay) did not switch, so create a zone Asia/Qostanay.

    Metlakatla moved from Alaska to Pacific standard time on 2018-11-04.
    It did not change clocks that day and remains on -08 this winter.
    (Thanks to Ryan Stanley.)  It will revert to the usual Alaska
    rules next spring, so this change affects only timestamps
    from 2018-11-04 through 2019-03-10.

  Change to past timestamps

    Kwajalein's 1993-08-20 transition from -12 to +12 was at 24:00,
    not 00:00.  I transcribed the time incorrectly from Shanks.
    (Thanks to Phake Nick.)

    Nauru's 1979 transition was on 02-10 at 02:00, not 05-01 at 00:00.
    (Thanks to Phake Nick.)

    Guam observed DST irregularly from 1959 through 1977.
    (Thanks to Phake Nick.)

    Hong Kong observed DST in 1941 starting 06-15 (not 04-01), then on
    10-01 changed standard time to +08:30 (not +08).  Its transition
    back to +08 after WWII was on 1945-09-15, not the previous day.
    Its 1904-10-30 change took effect at 01:00 +08 (not 00:00 LMT).
    (Thanks to Phake Nick, Steve Allen, and Joseph Myers.)  Also,
    its 1952 fallback was on 11-02 (not 10-25).

    This release contains many changes to timestamps before 1946 due
    to Japanese possession or occupation of Pacific/Chuuk,
    Pacific/Guam, Pacific/Kosrae, Pacific/Kwajalein, Pacific/Majuro,
    Pacific/Nauru, Pacific/Palau, and Pacific/Pohnpei.
    (Thanks to Phake Nick.)

    Assume that the Spanish East Indies was like the Philippines and
    observed American time until the end of 1844.  This affects
    Pacific/Chuuk, Pacific/Kosrae, Pacific/Palau, and Pacific/Pohnpei.

  Changes to past tm_isdst flags

    For the recent Morocco change, the tm_isdst flag should be 1 from
    2018-10-27 00:00 to 2018-10-28 03:00.  (Thanks to Michael Deckers.)
    Give a URL to the official decree.  (Thanks to Matt Johnson.)

diffstat:

 lib/libc/time/Makefile     |   22 ++++++--
 lib/libc/time/NEWS         |   97 +++++++++++++++++++++++++++++++++++++++-
 lib/libc/time/localtime.c  |   22 ++++++--
 lib/libc/time/theory.html  |    7 +-
 lib/libc/time/tz-art.html  |   27 +++++-----
 lib/libc/time/tz-link.html |  107 ++++++++++++++++++++------------------------
 lib/libc/time/version      |    2 +-
 lib/libc/time/zdump.c      |    8 ++-
 lib/libc/time/zic.c        |   12 ++--
 9 files changed, 201 insertions(+), 103 deletions(-)

diffs (truncated from 673 to 300 lines):

diff -r 07e600c63b6d -r c6b152a9ce06 lib/libc/time/Makefile
--- a/lib/libc/time/Makefile    Tue Jan 01 01:52:40 2019 +0000
+++ b/lib/libc/time/Makefile    Tue Jan 01 03:04:56 2019 +0000
@@ -380,15 +380,18 @@
 # is typically nicer if it works.
 KSHELL=                /bin/bash
 
+# Name of curl <https://curl.haxx.se/>, used for HTML validation.
+CURL=          curl
+
 # The path where SGML DTDs are kept and the catalog file(s) to use when
-# validating.  The default should work on both Debian and Red Hat.
+# validating HTML 4.01.  The default should work on both Debian and Red Hat.
 SGML_TOPDIR= /usr
 SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
 SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
 SGML_CATALOG_FILES= \
   $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
 
-# The name, arguments and environment of a program to validate your web pages.
+# The name, arguments and environment of a program to validate HTML 4.01.
 # See <http://openjade.sourceforge.net/doc/> for a validator, and
 # <https://validator.w3.org/source/> for a validation library.
 # Set VALIDATE=':' if you do not have such a program.
@@ -488,6 +491,7 @@
 COMMON=                calendars CONTRIBUTING LICENSE Makefile \
                        NEWS README theory.html version
 WEB_PAGES=     tz-art.html tz-how-to.html tz-link.html
+CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
 DOCS=          $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
 PRIMARY_YDATA= africa antarctica asia australasia \
                europe northamerica southamerica
@@ -799,9 +803,15 @@
                fi
                touch $@
 
-# This checks only the HTML 4.01 strict page.
-# To check the the other pages, use <https://validator.w3.org/>.
-check_web:     tz-how-to.html
+check_web:     $(CHECK_WEB_PAGES)
+check_tz-art.html: tz-art.html
+check_tz-link.html: tz-link.html
+check_tz-art.html check_tz-link.html:
+               $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
+                   -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \
+                 test ! -s $@.out || { cat $@.out; exit 1; }
+               mv $@.out $@
+check_tz-how-to.html: tz-how-to.html
                $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html
                touch $@
 
@@ -1068,7 +1078,7 @@
 
 .PHONY: ALL INSTALL all
 .PHONY: check check_time_t_alternatives
-.PHONY: check_zishrink
+.PHONY: check_web check_zishrink
 .PHONY: clean clean_misc dummy.zd force_tzs
 .PHONY: install install_data maintainer-clean names
 .PHONY: posix_only posix_packrat posix_right public
diff -r 07e600c63b6d -r c6b152a9ce06 lib/libc/time/NEWS
--- a/lib/libc/time/NEWS        Tue Jan 01 01:52:40 2019 +0000
+++ b/lib/libc/time/NEWS        Tue Jan 01 03:04:56 2019 +0000
@@ -1,14 +1,103 @@
 News for the tz database
 
+Release 2018i - 2018-12-30 11:05:43 -0800
+
+  Briefly:
+    São Tomé and Príncipe switches from +01 to +00 on 2019-01-01.
+
+  Changes to future timestamps
+
+    Due to a change in government, São Tomé and Príncipe switches back
+    from +01 to +00 on 2019-01-01 at 02:00.  (Thanks to Vadim
+    Nasardinov and Michael Deckers.)
+
+
+Release 2018h - 2018-12-23 17:59:32 -0800
+
+  Briefly:
+    Qyzylorda, Kazakhstan moved from +06 to +05 on 2018-12-21.
+    New zone Asia/Qostanay because Qostanay, Kazakhstan didn't move.
+    Metlakatla, Alaska observes PST this winter only.
+    Guess Morocco will continue to adjust clocks around Ramadan.
+    Add predictions for Iran from 2038 through 2090.
+
+  Changes to future timestamps
+
+    Guess that Morocco will continue to fall back just before and
+    spring forward just after Ramadan, the practice since 2012.
+    (Thanks to Maamar Abdelkader.)  This means Morocco will observe
+    negative DST during Ramadan in main and vanguard formats, and in
+    rearguard format it stays in the +00 timezone and observes
+    ordinary DST in all months other than Ramadan.  As before, extend
+    this guesswork to the year 2037.  As a consequence, Morocco is
+    scheduled to observe three DST transitions in some Gregorian years
+    (e.g., 2033) due to the mismatch between the Gregorian and Islamic
+    calendars.
+
+    The table of exact transitions for Iranian DST has been extended.
+    It formerly cut off before the year 2038 in a nod to 32-bit time_t.
+    It now cuts off before 2091 as there is doubt about how the Persian
+    calendar will treat 2091.  This change predicts DST transitions in
+    2038-9, 2042-3, and 2046-7 to occur one day later than previously
+    predicted.  As before, post-cutoff transitions are approximated.
+
+  Changes to past and future timestamps
+
+    Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
+    +05 on 2018-12-21.  This is a zone split as Qostanay (aka
+    Kostanay) did not switch, so create a zone Asia/Qostanay.
+
+    Metlakatla moved from Alaska to Pacific standard time on 2018-11-04.
+    It did not change clocks that day and remains on -08 this winter.
+    (Thanks to Ryan Stanley.)  It will revert to the usual Alaska
+    rules next spring, so this change affects only timestamps
+    from 2018-11-04 through 2019-03-10.
+
+  Change to past timestamps
+
+    Kwajalein's 1993-08-20 transition from -12 to +12 was at 24:00,
+    not 00:00.  I transcribed the time incorrectly from Shanks.
+    (Thanks to Phake Nick.)
+
+    Nauru's 1979 transition was on 02-10 at 02:00, not 05-01 at 00:00.
+    (Thanks to Phake Nick.)
+
+    Guam observed DST irregularly from 1959 through 1977.
+    (Thanks to Phake Nick.)
+
+    Hong Kong observed DST in 1941 starting 06-15 (not 04-01), then on
+    10-01 changed standard time to +08:30 (not +08).  Its transition
+    back to +08 after WWII was on 1945-09-15, not the previous day.
+    Its 1904-10-30 change took effect at 01:00 +08 (not 00:00 LMT).
+    (Thanks to Phake Nick, Steve Allen, and Joseph Myers.)  Also,
+    its 1952 fallback was on 11-02 (not 10-25).
+
+    This release contains many changes to timestamps before 1946 due
+    to Japanese possession or occupation of Pacific/Chuuk,
+    Pacific/Guam, Pacific/Kosrae, Pacific/Kwajalein, Pacific/Majuro,
+    Pacific/Nauru, Pacific/Palau, and Pacific/Pohnpei.
+    (Thanks to Phake Nick.)
+
+    Assume that the Spanish East Indies was like the Philippines and
+    observed American time until the end of 1844.  This affects
+    Pacific/Chuuk, Pacific/Kosrae, Pacific/Palau, and Pacific/Pohnpei.
+
+  Changes to past tm_isdst flags
+
+    For the recent Morocco change, the tm_isdst flag should be 1 from
+    2018-10-27 00:00 to 2018-10-28 03:00.  (Thanks to Michael Deckers.)
+    Give a URL to the official decree.  (Thanks to Matt Johnson.)
+
+
 Release 2018g - 2018-10-26 22:22:45 -0700
 
   Briefly:
-    Morocco switches to permanent +01 on 2018-10-27.
+    Morocco switches to permanent +01 on 2018-10-28.
 
   Changes to future timestamps
 
-    Morocco switches from +00/+01 to permanent +01 effective 2018-10-27,
-    so its clocks will not fall back on 2018-10-28 as previously scheduled.
+    Morocco switches from +00/+01 to permanent +01 effective 2018-10-28,
+    so its clocks will not fall back as previously scheduled.
     (Thanks to Mohamed Essedik Najd and Brian Inglis.)
 
   Changes to code
@@ -119,7 +208,7 @@
     localtime.c no longer ignores TZif POSIX-style TZ strings that
     specify only standard time.  Instead, these TZ strings now
     override the default time type for timestamps after the last
-    transition (or for all time stamps if there are no transitions),
+    transition (or for all timestamps if there are no transitions),
     just as DST strings specifying DST have always done.
 
     leapseconds.awk now outputs "#updated" and "#expires" comments,
diff -r 07e600c63b6d -r c6b152a9ce06 lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Tue Jan 01 01:52:40 2019 +0000
+++ b/lib/libc/time/localtime.c Tue Jan 01 03:04:56 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: localtime.c,v 1.113 2018/10/19 23:05:35 christos Exp $ */
+/*     $NetBSD: localtime.c,v 1.114 2019/01/01 03:04:56 christos Exp $ */
 
 /* Convert timestamp from time_t to struct tm.  */
 
@@ -12,7 +12,7 @@
 #if 0
 static char    elsieid[] = "@(#)localtime.c    8.17";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.113 2018/10/19 23:05:35 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.114 2019/01/01 03:04:56 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -461,6 +461,7 @@
        doaccess = name[0] == '/';
 #endif
        if (!doaccess) {
+               char const *dot;
                size_t namelen = strlen(name);
                if (sizeof lsp->fullname - sizeof tzdirslash <= namelen)
                        return ENAMETOOLONG;
@@ -471,9 +472,16 @@
                memcpy(lsp->fullname, tzdirslash, sizeof tzdirslash);
                strcpy(lsp->fullname + sizeof tzdirslash, name);
 
-               /* Set doaccess if '.' (as in "../") shows up in name.  */
-               if (strchr(name, '.'))
-                       doaccess = true;
+               /* Set doaccess if NAME contains a ".." file name
+                  component, as such a name could read a file outside
+                  the TZDIR virtual subtree.  */
+               for (dot = name; (dot = strchr(dot, '.')); dot++)
+                 if ((dot == name || dot[-1] == '/') && dot[1] == '.'
+                     && (dot[2] == '/' || !dot[2])) {
+                   doaccess = true;
+                   break;
+                 }
+
                name = lsp->fullname;
        }
        if (doaccess && access(name, R_OK) != 0)
@@ -829,7 +837,7 @@
 ** Return a pointer to that character.
 */
 
-static const char *
+static ATTRIBUTE_PURE const char *
 getzname(const char *strp)
 {
        char    c;
@@ -850,7 +858,7 @@
 ** We don't do any checking here; checking is done later in common-case code.
 */
 
-static const char *
+static ATTRIBUTE_PURE const char *
 getqzname(const char *strp, const int delim)
 {
        int     c;
diff -r 07e600c63b6d -r c6b152a9ce06 lib/libc/time/theory.html
--- a/lib/libc/time/theory.html Tue Jan 01 01:52:40 2019 +0000
+++ b/lib/libc/time/theory.html Tue Jan 01 03:04:56 2019 +0000
@@ -406,7 +406,7 @@
       EAT East Africa,
       EST/EDT/EWT/EPT/EDDT Eastern [North America],
       EET/EEST Eastern European,
-      GST Guam,
+      GST/GDT Guam,
       HST/HDT/HWT/HPT Hawaii,
       HKT/HKST Hong Kong,
       IST India,
@@ -1238,7 +1238,7 @@
 use <a href="https://en.wikipedia.org/wiki/Timekeeping_on_Mars";>Mars time</a>.
 Jet Propulsion Laboratory (JPL) coordinators kept Mars time on
 and off during the
-<a href="https://en.wikipedia.org/wiki/Mars_Pathfinder#End_of_mission";>Mars
+<a href="https://en.wikipedia.org/wiki/Mars_Pathfinder";>Mars
 Pathfinder</a> mission.
 Some of their family members also adapted to Mars time.
 Dozens of special Mars watches were built for JPL workers who kept
@@ -1261,8 +1261,7 @@
 honor of the British astronomer who built the Greenwich telescope that
 defines Earth's prime meridian.
 Mean solar time on the Mars prime meridian is
-called <a href="https://en.wikipedia.org/wiki/Mars_Coordinated_Time";>Mars
-Coordinated Time (<abbr>MTC</abbr>)</a>.
+called Mars Coordinated Time (<abbr>MTC</abbr>).
 </p>
 
 <p>
diff -r 07e600c63b6d -r c6b152a9ce06 lib/libc/time/tz-art.html
--- a/lib/libc/time/tz-art.html Tue Jan 01 01:52:40 2019 +0000
+++ b/lib/libc/time/tz-art.html Tue Jan 01 03:04:56 2019 +0000
@@ -36,19 +36,15 @@
 The time does not play a large part in the plot;
 it's just a passing reference to the time when one of the
 characters was supposed to have died (but didn't).
-The IMDb page is at
-<a href="http://us.imdb.com/title/tt0038733/";>
-http://us.imdb.com/title/tt0038733/
-</a>. (Dave Cantor)
+(<a href="http://us.imdb.com/title/tt0038733/";>IMDb entry.</a>)
+(Dave Cantor)
 <li>
 The 1953 railway comedy movie <em>The Titfield Thunderbolt</em> includes a
 play on words on British Double Summer Time. Valentine's wife wants
 him to leave the pub and asks him, "Do you know what time it is?"
 And he, happy where he is, replies: "Yes, my love. Summer double time."
-IMDb page:
-<a href="http://us.imdb.com/title/tt0046436/";>
-http://us.imdb.com/title/tt0046436/
-</a>. (Mark Brader, 2009-10-02)
+(<a href="http://us.imdb.com/title/tt0046436/";>IMDb entry.</a>)
+(Mark Brader, 2009-10-02)
 </li>
 <li>



Home | Main Index | Thread Index | Old Index