Source-Changes-HG archive

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

[src/trunk]: src/lib/libc/time Welcome to 2014c



details:   https://anonhg.NetBSD.org/src/rev/bf2f4cb6d4c3
branches:  trunk
changeset: 329175:bf2f4cb6d4c3
user:      christos <christos%NetBSD.org@localhost>
date:      Tue May 13 16:33:56 2014 +0000

description:
Welcome to 2014c
   Changes affecting code

     zic now generates transitions for minimum time values, eliminating
     guesswork when handling low-valued time stamps.  (Thanks to Arthur
     David Olson.)

     Port to Cygwin sans glibc.  (Thanks to Arthur David Olson.)

   Changes affecting commentary and documentation

     Remove now-confusing comment about Jordan.  (Thanks to Oleksii
     Nochovnyi.)

diffstat:

 lib/libc/time/Makefile     |   15 ++--
 lib/libc/time/NEWS         |  134 +++++++++++++++++++++++++++++++++++++++++++
 lib/libc/time/checktab.awk |   22 +++++-
 lib/libc/time/localtime.c  |   38 +++++------
 lib/libc/time/private.h    |   11 ++-
 lib/libc/time/tz-link.htm  |  105 ++++++++++++++++++++-------------
 lib/libc/time/tzfile.h     |    4 +-
 lib/libc/time/tzset.3      |    6 +-
 lib/libc/time/zdump.c      |    8 +-
 lib/libc/time/zic.c        |  139 ++++++++++++++++++++++----------------------
 10 files changed, 327 insertions(+), 155 deletions(-)

diffs (truncated from 1065 to 300 lines):

diff -r 16fada4f83ae -r bf2f4cb6d4c3 lib/libc/time/Makefile
--- a/lib/libc/time/Makefile    Tue May 13 05:30:38 2014 +0000
+++ b/lib/libc/time/Makefile    Tue May 13 16:33:56 2014 +0000
@@ -6,7 +6,7 @@
 PACKAGE=       tzcode
 
 # Version numbers of the code and data distributions.
-VERSION=       2013i
+VERSION=       2014c
 
 # Email address for bug reports.
 BUGEMAIL=      tz%iana.org@localhost
@@ -137,7 +137,7 @@
        -Wbad-function-cast -Wcast-align -Wcast-qual \
        -Wformat=2 -Winit-self \
        -Wmissing-declarations -Wmissing-noreturn -Wmissing-prototypes \
-       -Wnested-externs \
+       -Wnested-externs -Wno-address -Wno-cast-qual \
        -Wno-format-nonliteral -Wno-sign-compare -Wno-sign-conversion \
        -Wno-type-limits \
        -Wno-unused-parameter -Woverlength-strings -Wpointer-arith \
@@ -247,14 +247,13 @@
 # is typically nicer if it works.
 KSHELL=                /bin/bash
 
-# The path where SGML DTDs are kept.
-# The default is appropriate for Ubuntu 12.10.
+# The path where SGML DTDs are kept and the catalog file(s) to use when
+# validating.  The default is appropriate for Ubuntu 13.10.
 SGML_TOPDIR= /usr
 SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
 SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
-
-# The catalog file(s) to use when validating.
-SGML_CATALOG_FILES= HTML4.cat
+SGML_CATALOG_FILES= \
+  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat
 
 # The name, arguments and environment of a program to validate your web pages.
 # See <http://www.jclark.com/sp/> for a validator, and
@@ -445,7 +444,7 @@
 
 clean_misc:
                rm -f core *.o *.out \
-                 date tzselect version.h zdump zic yearistype
+                 date tzselect version.h zdump zic yearistype libtz.a
 clean:         clean_misc
                rm -fr tzpublic
 
diff -r 16fada4f83ae -r bf2f4cb6d4c3 lib/libc/time/NEWS
--- a/lib/libc/time/NEWS        Tue May 13 05:30:38 2014 +0000
+++ b/lib/libc/time/NEWS        Tue May 13 16:33:56 2014 +0000
@@ -1,5 +1,138 @@
 News for the tz database
 
+
+Release 2014c - 2014-05-13 07:44:13 -0700
+
+  Changes affecting near-future time stamps
+
+    Egypt observes DST starting May 15.  (Thanks to Ahmad El-Dardiry.)
+    Details have not been announced, except that DST will not be observed
+    during Ramadan.  Guess that DST will stop during the same Ramadan dates as
+    Morocco, and that Egypt's future spring and fall transitions will be the
+    same as 2010 when it last observed DST, namely April's last Friday at
+    00:00 to September's last Thursday at 23:00 standard time.  Also, guess
+    that Ramadan transitions will be at 00:00 standard time.
+
+  Changes affecting code
+
+    zic now generates transitions for minimum time values, eliminating guesswork
+    when handling low-valued time stamps.  (Thanks to Arthur David Olson.)
+
+    Port to Cygwin sans glibc.  (Thanks to Arthur David Olson.)
+
+  Changes affecting commentary and documentation
+
+    Remove now-confusing comment about Jordan.  (Thanks to Oleksii Nochovnyi.)
+
+
+Release 2014b - 2014-03-24 21:28:50 -0700
+
+  Changes affecting near-future time stamps
+
+    Crimea switches to Moscow time on 2014-03-30 at 02:00 local time.
+    (Thanks to Alexander Krivenyshev.)  Move its zone.tab entry from UA to RU.
+
+    New entry for Troll station, Antarctica.  (Thanks to Paul-Inge Flakstad and
+    Bengt-Inge Larsson.)  This is currently an approximation; a better version
+    will require the zic and localtime fixes mentioned below, and the plan is
+    to wait for a while until at least the zic fixes propagate.
+
+  Changes affecting code
+
+    'zic' and 'localtime' no longer reject locations needing four transitions
+    per year for the forseeable future.  (Thanks to Andrew Main (Zefram).)
+    Also, 'zic' avoids some unlikely failures due to integer overflow.
+
+  Changes affecting build procedure
+
+    'make check' now detects Rule lines defined but never used.
+    The NZAQ rules, an instance of this problem, have been removed.
+
+  Changes affecting commentary and documentation
+
+    Fix Tuesday/Thursday typo in description of time in Israel.
+    (Thanks to Bert Katz via Pavel Kharitonov and Mike Frysinger.)
+
+    Microsoft Windows 8.1 doesn't support tz database names.  (Thanks
+    to Donald MacQueen.)  Instead, the Microsoft Windows Store app
+    library supports them.
+
+    Add comments about Johnston Island time in the 1960s.
+    (Thanks to Lyle McElhaney.)
+
+    Morocco's 2014 DST start will be as predicted.
+    (Thanks to Sebastien Willemijns.)
+
+
+Release 2014a - 2014-03-07 23:30:29 -0800
+
+  Changes affecting near-future time stamps
+
+    Turkey begins DST on 2014-03-31, not 03-30.  (Thanks to Faruk Pasin for
+    the heads-up, and to Tim Parenti for simplifying the update.)
+
+  Changes affecting past time stamps
+
+    Fiji ended DST on 2014-01-19 at 02:00, not the previously-scheduled 03:00.
+    (Thanks to Steffen Thorsen.)
+
+    Ukraine switched from Moscow to Eastern European time on 1990-07-01
+    (not 1992-01-01), and observed DST during the entire next winter.
+    (Thanks to Vladimir in Moscow via Alois Treindl.)
+
+    In 1988 Israel observed DST from 04-10 to 09-04, not 04-09 to 09-03.
+    (Thanks to Avigdor Finkelstein.)
+
+  Changes affecting code
+
+    A uninitialized-storage bug in 'localtime' has been fixed.
+    (Thanks to Logan Chien.)
+
+  Changes affecting the build procedure
+
+    The settings for 'make check_web' now default to Ubuntu 13.10.
+
+  Changes affecting commentary and documentation
+
+    The boundary of the US Pacific time zone is given more accurately.
+    (Thanks to Alan Mintz.)
+
+    Chile's 2014 DST will be as predicted.  (Thanks to Jose Miguel Garrido.)
+
+    Paraguay's 2014 DST will be as predicted.  (Thanks to Carlos Raul Perasso.)
+
+    Better descriptions of countries with same time zone history as
+    Trinidad and Tobago since 1970.  (Thanks to Alan Barrett for suggestion.)
+
+    Several changes affect tz-link.htm, the main web page.
+
+      Mention Time.is (thanks to Even Scharning) and WX-now (thanks to
+      David Braverman).
+
+      Mention xCal (Internet RFC 6321) and jCal.
+
+      Microsoft has some support for tz database names.
+
+      CLDR data is available in both XML and JSON form.
+
+      Mention Maggiolo's map of solar vs standard time.
+      (Thanks to Arthur David Olson.)
+
+      Mention TZ4Net.  (Thanks to Matt Johnson.)
+
+      Mention the timezone-olson Haskell package.
+
+      Mention zeitverschiebung.net.  (Thanks to Martin Jaeger.)
+
+      Remove moribund links to daylight-savings-time.info and to
+      Simple Timer + Clocks.
+
+      Update two links.  (Thanks to Oscar van Vlijmen.)
+
+      Fix some formatting glitches, e.g., remove random newlines from
+      abbr elements' title attributes.
+
+
 Release 2013i - 2013-12-17 07:25:23 -0800
 
   Changes affecting near-future time stamps:
@@ -29,6 +162,7 @@
 
     tz-link.htm now mentions Noda Time.  (Thanks to Matt Johnson.)
 
+
 Release 2013h - 2013-10-25 15:32:32 -0700
 
   Changes affecting current and future time stamps:
diff -r 16fada4f83ae -r bf2f4cb6d4c3 lib/libc/time/checktab.awk
--- a/lib/libc/time/checktab.awk        Tue May 13 05:30:38 2014 +0000
+++ b/lib/libc/time/checktab.awk        Tue May 13 16:33:56 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: checktab.awk,v 1.6 2013/09/20 19:06:54 christos Exp $
+#      $NetBSD: checktab.awk,v 1.7 2014/05/13 16:33:56 christos Exp $
 
 # Check tz tables for consistency.
 
@@ -117,10 +117,14 @@
        FS = " "
 }
 
+$1 ~ /^#/ { next }
+
 {
-       tz = ""
-       if ($1 == "Zone") tz = $2
-       if ($1 == "Link") {
+       tz = rules = ""
+       if ($1 == "Zone") {
+               tz = $2
+               ruleUsed[$4] = 1
+       } else if ($1 == "Link") {
                # Ignore Link commands if source and destination basenames
                # are identical, e.g. Europe/Istanbul versus Asia/Istanbul.
                src = $2
@@ -128,6 +132,10 @@
                while ((i = index(src, "/"))) src = substr(src, i+1)
                while ((i = index(dst, "/"))) dst = substr(dst, i+1)
                if (src != dst) tz = $3
+       } else if ($1 == "Rule") {
+               ruleDefined[$2] = 1
+       } else {
+               ruleUsed[$2] = 1
        }
        if (tz && tz ~ /\//) {
                if (!tztab[tz]) {
@@ -140,6 +148,12 @@
 }
 
 END {
+       for (tz in ruleDefined) {
+               if (!ruleUsed[tz]) {
+                       printf "%s: Rule never used\n", tz
+                       status = 1
+               }
+       }
        for (tz in tz2cc) {
                if (!zoneSeen[tz]) {
                        printf "%s:%d: no Zone table for `%s'\n", \
diff -r 16fada4f83ae -r bf2f4cb6d4c3 lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Tue May 13 05:30:38 2014 +0000
+++ b/lib/libc/time/localtime.c Tue May 13 16:33:56 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: localtime.c,v 1.81 2013/12/26 18:34:28 christos Exp $  */
+/*     $NetBSD: localtime.c,v 1.82 2014/05/13 16:33:56 christos Exp $  */
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char    elsieid[] = "@(#)localtime.c    8.17";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.81 2013/12/26 18:34:28 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.82 2014/05/13 16:33:56 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -388,7 +388,7 @@
        } u_t;
        u_t *                   up;
 
-       up = calloc(1, sizeof *up);
+       up = malloc(sizeof *up);
        if (up == NULL)
                return -1;
 
@@ -1062,6 +1062,7 @@
                        sp->ttis[1].tt_gmtoff = -stdoffset;
                        sp->ttis[1].tt_isdst = 0;
                        sp->ttis[1].tt_abbrind = 0;
+                       sp->defaulttype = 0;
                        timecnt = 0;
                        janfirst = 0;
                        sp->timecnt = 0;
@@ -1189,6 +1190,7 @@
                        sp->ttis[1].tt_isdst = TRUE;
                        sp->ttis[1].tt_abbrind = (int)(stdlen + 1);
                        sp->typecnt = 2;
+                       sp->defaulttype = 0;
                }
        } else {
                dstlen = 0;
@@ -1198,6 +1200,7 @@
                sp->ttis[0].tt_gmtoff = -stdoffset;
                sp->ttis[0].tt_isdst = 0;
                sp->ttis[0].tt_abbrind = 0;
+               sp->defaulttype = 0;
        }
        sp->charcnt = (int)(stdlen + 1);



Home | Main Index | Thread Index | Old Index