Hello community, here is the log from the commit of package timezone for openSUSE:Factory checked in at 2015-05-22 16:26:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/timezone (Old) and /work/SRC/openSUSE:Factory/.timezone.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "timezone" Changes: -------- --- /work/SRC/openSUSE:Factory/timezone/timezone-java.changes 2015-04-28 20:41:20.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.timezone.new/timezone-java.changes 2015-05-22 16:26:57.000000000 +0200 @@ -1,0 +2,27 @@ +Tue May 19 11:02:27 UTC 2015 - [email protected] + +- tzcode-zic-empty-comp.diff: Replaced by more sophisticated fix + from upstream + +------------------------------------------------------------------- +Mon May 18 13:57:44 UTC 2015 - [email protected] + +- tzcode-zic-empty-comp.diff: Fix check for empty components in + absolute path + +------------------------------------------------------------------- +Thu May 14 12:16:44 UTC 2015 - [email protected] + +- Fix post-install script to overwrite the temporary file when + attempting to create /etc/localtime as a hard link [bsc#928841] + +------------------------------------------------------------------- +Thu May 14 12:08:51 UTC 2015 - [email protected] + +- timezone update 2015d [bsc#928584, bsc#928246] + * Egypt announced it is off DST indefinitely + * zic has some minor performance improvements +- tzcode-fromname.patch, tzcode-link.diff, tzcode-symlink.patch, + tzcode-zic.diff, tzdata-china.diff: Rebase + +------------------------------------------------------------------- timezone.changes: same change Old: ---- tzcode2015c.tar.gz tzcode2015c.tar.gz.asc tzdata2015c.tar.gz tzdata2015c.tar.gz.asc New: ---- tzcode-zic-empty-comp.diff tzcode2015d.tar.gz tzcode2015d.tar.gz.asc tzdata2015d.tar.gz tzdata2015d.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ timezone-java.spec ++++++ --- /var/tmp/diff_new_pack.coXBKn/_old 2015-05-22 16:26:58.000000000 +0200 +++ /var/tmp/diff_new_pack.coXBKn/_new 2015-05-22 16:26:58.000000000 +0200 @@ -25,7 +25,7 @@ Group: System/Base # COMMON-BEGIN # COMMON-BEGIN -Version: 2015c +Version: 2015d Release: 0 Source: ftp://ftp.iana.org/tz/releases/tzdata%{version}.tar.gz Source1: ftp://ftp.iana.org/tz/releases/tzcode%{version}.tar.gz @@ -40,6 +40,7 @@ Patch3: iso3166-uk.diff Patch4: tzcode-link.diff Patch5: tzcode-symlink.patch +Patch6: tzcode-zic-empty-comp.diff # COMMON-END # COMMON-END Url: http://www.gnu.org/software/libc/libc.html @@ -63,6 +64,7 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch6 -p1 %if 0%{?suse_version} < 1220 %patch4 -p1 %else ++++++ timezone.spec ++++++ --- /var/tmp/diff_new_pack.coXBKn/_old 2015-05-22 16:26:58.000000000 +0200 +++ /var/tmp/diff_new_pack.coXBKn/_new 2015-05-22 16:26:58.000000000 +0200 @@ -23,7 +23,7 @@ Url: http://www.iana.org/time-zones PreReq: filesystem, coreutils # COMMON-BEGIN -Version: 2015c +Version: 2015d Release: 0 Source: ftp://ftp.iana.org/tz/releases/tzdata%{version}.tar.gz Source1: ftp://ftp.iana.org/tz/releases/tzcode%{version}.tar.gz @@ -38,6 +38,7 @@ Patch3: iso3166-uk.diff Patch4: tzcode-link.diff Patch5: tzcode-symlink.patch +Patch6: tzcode-zic-empty-comp.diff # COMMON-END BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -57,6 +58,7 @@ %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch6 -p1 %if 0%{?suse_version} < 1220 %patch4 -p1 %else @@ -110,7 +112,7 @@ ln -sf /usr/share/zoneinfo/$TIMEZONE /etc/localtime %else new=$(mktemp /etc/localtime.XXXXXXXX) || exit 1 - cp -l /usr/share/zoneinfo/$TIMEZONE $new 2>/dev/null || cp -fp /usr/share/zoneinfo/$TIMEZONE $new + cp -fl /usr/share/zoneinfo/$TIMEZONE $new 2>/dev/null || cp -fp /usr/share/zoneinfo/$TIMEZONE $new mv -f $new /etc/localtime %endif else ++++++ timezone-java.spec.in ++++++ --- /var/tmp/diff_new_pack.coXBKn/_old 2015-05-22 16:26:58.000000000 +0200 +++ /var/tmp/diff_new_pack.coXBKn/_new 2015-05-22 16:26:58.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package timezone-java # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed ++++++ tzcode-fromname.patch ++++++ --- /var/tmp/diff_new_pack.coXBKn/_old 2015-05-22 16:26:58.000000000 +0200 +++ /var/tmp/diff_new_pack.coXBKn/_new 2015-05-22 16:26:58.000000000 +0200 @@ -1,16 +1,17 @@ -Index: timezone-2014i/zic.c +Index: timezone-2015d/zic.c =================================================================== ---- timezone-2014i.orig/zic.c -+++ timezone-2014i/zic.c -@@ -729,17 +729,17 @@ dolink(const char *const fromfield, cons +--- timezone-2015d.orig/zic.c ++++ timezone-2015d/zic.c +@@ -757,7 +757,7 @@ dolink(const char *const fromfield, cons result = link(fromname, toname); if (result != 0) { - const char *s = fromfield; + const char *s = fromname; const char *t; - register char * symlinkcontents = NULL; - + char *p; + size_t dotdots = 0; +@@ -766,10 +766,10 @@ dolink(const char *const fromfield, cons do t = s; while ((s = strchr(s, '/')) @@ -19,8 +20,8 @@ + && ! strncmp (fromname, tofield, + ++s - fromname)); -- for (s = tofield + (t - fromfield); -+ for (s = tofield + (t - fromname); - (s = strchr(s, '/')); - s++) - symlinkcontents = +- for (s = tofield + (t - fromfield); *s; s++) ++ for (s = tofield + (t - fromname); *s; s++) + dotdots += *s == '/'; + symlinkcontents + = emalloc(3 * dotdots + strlen(t) + 1); ++++++ tzcode-link.diff ++++++ --- /var/tmp/diff_new_pack.coXBKn/_old 2015-05-22 16:26:58.000000000 +0200 +++ /var/tmp/diff_new_pack.coXBKn/_new 2015-05-22 16:26:58.000000000 +0200 @@ -15,12 +15,12 @@ 2. File copy 3. Symbolic link -Index: timezone-2014g/zic.c +Index: timezone-2015d/zic.c =================================================================== ---- timezone-2014g.orig/zic.c -+++ timezone-2014g/zic.c -@@ -686,6 +686,23 @@ namecheck(const char *name) - componentcheck(name, component, cp); +--- timezone-2015d.orig/zic.c ++++ timezone-2015d/zic.c +@@ -734,6 +734,23 @@ relname(char const *dir, char const *bas + } } +static int @@ -43,7 +43,7 @@ static void dolink(const char *const fromfield, const char *const tofield) { -@@ -728,6 +745,8 @@ dolink(const char *const fromfield, cons +@@ -763,6 +780,8 @@ dolink(const char *const fromfield, cons exit(EXIT_FAILURE); result = link(fromname, toname); ++++++ tzcode-symlink.patch ++++++ --- /var/tmp/diff_new_pack.coXBKn/_old 2015-05-22 16:26:58.000000000 +0200 +++ /var/tmp/diff_new_pack.coXBKn/_new 2015-05-22 16:26:58.000000000 +0200 @@ -13,11 +13,11 @@ links if /etc/localtime is already one. If it isn't, use the default order as listed above. -Index: timezone-2014i/zic.c +Index: timezone-2015d/zic.c =================================================================== ---- timezone-2014i.orig/zic.c -+++ timezone-2014i/zic.c -@@ -106,7 +106,7 @@ static int addtype(zic_t, char const *, +--- timezone-2015d.orig/zic.c ++++ timezone-2015d/zic.c +@@ -104,7 +104,7 @@ static int addtype(zic_t, char const *, static void leapadd(zic_t, bool, int, int); static void adjleap(void); static void associate(void); @@ -26,7 +26,7 @@ static char ** getfields(char * buf); static zic_t gethms(const char * string, const char * errstring, bool); -@@ -608,7 +608,7 @@ _("%s: More than one -L option specified +@@ -629,7 +629,7 @@ _("%s: More than one -L option specified */ for (i = 0; i < nlinks; ++i) { eat(links[i].l_filename, links[i].l_linenum); @@ -35,7 +35,7 @@ if (noise) for (j = 0; j < nlinks; ++j) if (strcmp(links[i].l_to, -@@ -617,11 +617,11 @@ _("%s: More than one -L option specified +@@ -638,11 +638,11 @@ _("%s: More than one -L option specified } if (lcltime != NULL) { eat(_("command line"), 1); @@ -49,7 +49,7 @@ } if (warnings && (ferror(stderr) || fclose(stderr) != 0)) return EXIT_FAILURE; -@@ -687,8 +687,9 @@ namecheck(const char *name) +@@ -735,14 +735,17 @@ relname(char const *dir, char const *bas } static void @@ -60,18 +60,15 @@ register char * fromname; register char * toname; register int fromisdir; -@@ -701,6 +702,10 @@ dolink(const char *const fromfield, cons - fromname = ecatalloc(fromname, "/"); - fromname = ecatalloc(fromname, fromfield); - } -+ + + fromname = relname(directory, fromfield); + toname = relname(directory, tofield); + if (lstat(fromname, &st) == 0 && S_ISLNK(st.st_mode)) + defaultsymlink = true; -+ - if (tofield[0] == '/') - toname = ecpyalloc(tofield); - else { -@@ -721,14 +726,15 @@ dolink(const char *const fromfield, cons + /* + ** We get to be careful here since + ** there's a fair chance of root running us. +@@ -756,14 +759,14 @@ dolink(const char *const fromfield, cons } if (itsdir(toname) <= 0) remove(toname); @@ -81,7 +78,7 @@ if (! mkdirs(toname)) exit(EXIT_FAILURE); - +- - result = link(fromname, toname); - if (result != 0) { + if (!defaultsymlink) @@ -89,4 +86,4 @@ + if ((defaultsymlink || (!defaultsymlink && result != 0))) { const char *s = fromname; const char *t; - register char * symlinkcontents = NULL; + char *p; ++++++ tzcode-zic-empty-comp.diff ++++++ commit fc861a9e137c63e1b0d562ad09d0dd5f4d8e798f Author: Paul Eggert <[email protected]> Date: Tue May 19 01:24:30 2015 -0700 Fix zic -l problem with /etc/localtime Problem reported by Leonardo Chiquitto in: http://mm.icann.org/pipermail/tz/2015-May/022276.html Apparently his zic was built with -DTZDEFAULT=\"/etc/localtime\". * NEWS: Document this. * zic.c (verror): Don't dump core if filename is NULL. (main, infile, mkdirs): Omit unnecessary trailing \n in diagnostic. (componentcheck, namecheck): Now returns bool. All callers changed. (componentcheck): Make the diagnostics more understandable. Don't exit on error, so that the user can see multiple errors. (dolink, writezone): Don't namecheck here. (inzsub, inlink): Do it here instead. This generates better diagnostics, and avoids the bug, since it doesn't apply namecheck to TZDEFAULT or to TZDEFRULES. Index: timezone-2015d/NEWS =================================================================== --- timezone-2015d.orig/NEWS +++ timezone-2015d/NEWS @@ -25,6 +25,10 @@ Release 2015d - 2015-04-24 08:09:46 -070 zic has some minor performance improvements. + zic -l no longer fails when compiled with -DTZDEFAULT=\"/etc/localtime\". + This fixes a bug introduced in Release 2014f. + (Problem reported by Leonardo Chiquitto.) + Release 2015c - 2015-04-11 08:55:55 -0700 Index: timezone-2015d/zic.c =================================================================== --- timezone-2015d.orig/zic.c +++ timezone-2015d/zic.c @@ -443,7 +443,8 @@ verror(const char *const string, va_list ** zic ... 2>&1 | error -t "*" -v ** on BSD systems. */ - fprintf(stderr, _("\"%s\", line %d: "), filename, linenum); + if (filename) + fprintf(stderr, _("\"%s\", line %d: "), filename, linenum); vfprintf(stderr, string, args); if (rfilename != NULL) fprintf(stderr, _(" (rule from \"%s\", line %d)"), @@ -595,7 +596,7 @@ _("%s: More than one -L option specified noise = true; break; case 's': - warning(_("-s ignored\n")); + warning(_("-s ignored")); break; } if (optind == argc - 1 && strcmp(argv[optind], "=") == 0) @@ -648,36 +649,43 @@ _("%s: More than one -L option specified return errors ? EXIT_FAILURE : EXIT_SUCCESS; } -static void +static bool componentcheck(char const *name, char const *component, char const *component_end) { enum { component_len_max = 14 }; size_t component_len = component_end - component; if (component_len == 0) { - fprintf(stderr, _("%s: file name '%s' contains empty component"), - progname, name); - exit(EXIT_FAILURE); + if (!*name) + error (_("empty file name")); + else + error (_(component == name + ? "file name '%s' begins with '/'" + : *component_end + ? "file name '%s' contains '//'" + : "file name '%s' ends with '/'"), + name); + return false; } if (0 < component_len && component_len <= 2 && component[0] == '.' && component_end[-1] == '.') { - fprintf(stderr, _("%s: file name '%s' contains" - " '%.*s' component"), - progname, name, (int) component_len, component); - exit(EXIT_FAILURE); + error(_("file name '%s' contains '%.*s' component"), + name, (int) component_len, component); + return false; } - if (!noise) - return; - if (0 < component_len && component[0] == '-') - warning(_("file name '%s' component contains leading '-'"), - name); - if (component_len_max < component_len) - warning(_("file name '%s' contains overlength component" - " '%.*s...'"), - name, component_len_max, component); + if (noise) { + if (0 < component_len && component[0] == '-') + warning(_("file name '%s' component contains leading '-'"), + name); + if (component_len_max < component_len) + warning(_("file name '%s' contains overlength component" + " '%.*s...'"), + name, component_len_max, component); + } + return true; } -static void +static bool namecheck(const char *name) { register char const *cp; @@ -701,14 +709,14 @@ namecheck(const char *name) ? _("file name '%s' contains byte '%c'") : _("file name '%s' contains byte '\\%o'")), name, c); - return; } if (c == '/') { - componentcheck(name, component, cp); + if (!componentcheck(name, component, cp)) + return false; component = cp + 1; } } - componentcheck(name, component, cp); + return componentcheck(name, component, cp); } static char * @@ -733,7 +741,6 @@ dolink(const char *const fromfield, cons register char * toname; register int fromisdir; - namecheck(tofield); fromname = relname(directory, fromfield); toname = relname(directory, tofield); /* @@ -1022,9 +1029,9 @@ infile(const char *name) break; case LC_LEAP: if (name != leapsec) - warning( -_("%s: Leap line in non leap seconds file %s\n"), - progname, name); + warning(_("%s: Leap line in non leap" + " seconds file %s"), + progname, name); else inleap(fields, nfields); wantcont = false; break; @@ -1180,7 +1187,9 @@ inzsub(char **fields, int nfields, bool i_untilday = ZFC_TILDAY; i_untiltime = ZFC_TILTIME; z.z_name = NULL; - } else { + } else if (!namecheck(fields[ZF_NAME])) + return false; + else { i_gmtoff = ZF_GMTOFF; i_rule = ZF_RULE; i_format = ZF_FORMAT; @@ -1356,10 +1365,8 @@ inlink(register char **const fields, con error(_("blank FROM field on Link line")); return; } - if (*fields[LF_TO] == '\0') { - error(_("blank TO field on Link line")); - return; - } + if (! namecheck(fields[LF_TO])) + return; l.l_filename = filename; l.l_linenum = linenum; l.l_from = ecpyalloc(fields[LF_FROM]); @@ -1589,7 +1596,6 @@ writezone(const char *const name, const void *typesptr = ats + timecnt; unsigned char *types = typesptr; - namecheck(name); /* ** Sort. */ @@ -2954,7 +2960,7 @@ mkdirs(char *argname) if (itsdir(name) <= 0) { char const *e = strerror(err); warning(_("%s: Can't create directory" - " %s: %s\n"), + " %s: %s"), progname, name, e); free(name); return false; ++++++ tzcode-zic.diff ++++++ --- /var/tmp/diff_new_pack.coXBKn/_old 2015-05-22 16:26:58.000000000 +0200 +++ /var/tmp/diff_new_pack.coXBKn/_new 2015-05-22 16:26:58.000000000 +0200 @@ -1,10 +1,10 @@ -Index: timezone-2014i/zic.c +Index: timezone-2015d/zic.c =================================================================== ---- timezone-2014i.orig/zic.c -+++ timezone-2014i/zic.c -@@ -747,8 +747,10 @@ dolink(const char *const fromfield, cons - "../"); - symlinkcontents = ecatalloc(symlinkcontents, t); +--- timezone-2015d.orig/zic.c ++++ timezone-2015d/zic.c +@@ -777,8 +777,10 @@ dolink(const char *const fromfield, cons + memcpy(p, "../", 3); + strcpy(p, t); result = symlink(symlinkcontents, toname); +#if 0 if (result == 0) ++++++ tzcode2015c.tar.gz -> tzcode2015d.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Makefile new/Makefile --- old/Makefile 2015-04-11 17:57:06.000000000 +0200 +++ new/Makefile 2015-04-24 17:11:35.000000000 +0200 @@ -5,7 +5,7 @@ PACKAGE= tzcode # Version numbers of the code and data distributions. -VERSION= 2015c +VERSION= 2015d # Email address for bug reports. BUGEMAIL= [email protected] @@ -120,6 +120,7 @@ # -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h" # -DHAVE_STRFTIME_L=1 if <time.h> declares locale_t and strftime_l # This defaults to 0 if _POSIX_VERSION < 200809, 1 otherwise. +# -DHAVE_STRDUP=0 if your system lacks the strdup function # -DHAVE_SYMLINK=0 if your system lacks the symlink function # -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h" # -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h" @@ -330,13 +331,13 @@ # ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. RANLIB= : -TZCOBJS= zic.o scheck.o ialloc.o +TZCOBJS= zic.o TZDOBJS= zdump.o localtime.o asctime.o DATEOBJS= date.o localtime.o strftime.o asctime.o LIBSRCS= localtime.c asctime.c difftime.c LIBOBJS= localtime.o asctime.o difftime.o HEADERS= tzfile.h private.h -NONLIBSRCS= zic.c zdump.c scheck.c ialloc.c +NONLIBSRCS= zic.c zdump.c NEWUCBSRCS= date.c strftime.c SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ tzselect.ksh workman.sh @@ -654,9 +655,7 @@ asctime.o: private.h tzfile.h date.o: private.h difftime.o: private.h -ialloc.o: private.h localtime.o: private.h tzfile.h -scheck.o: private.h strftime.o: private.h tzfile.h zdump.o: version.h zic.o: private.h tzfile.h version.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NEWS new/NEWS --- old/NEWS 2015-04-11 17:57:06.000000000 +0200 +++ new/NEWS 2015-04-24 17:11:35.000000000 +0200 @@ -1,5 +1,31 @@ News for the tz database +Release 2015d - 2015-04-24 08:09:46 -0700 + + Changes affecting future time stamps + + Egypt will not observe DST in 2015 and will consider canceling it + permanently. For now, assume no DST indefinitely. + (Thanks to Ahmed Nazmy and Tim Parenti.) + + Changes affecting past time stamps + + America/Whitehorse switched from UTC-9 to UTC-8 on 1967-05-28, not + 1966-07-01. Also, Yukon's time zone history is documented better. + (Thanks to Brian Inglis and Dennis Ferguson.) + + Change affecting past and future time zone abbreviations + + The abbreviations for Hawaii-Aleutian standard and daylight times + have been changed from HAST/HADT to HST/HDT, as per US Government + Printing Office style. This affects only America/Adak since 1983, + as America/Honolulu was already using the new style. + + Changes affecting code + + zic has some minor performance improvements. + + Release 2015c - 2015-04-11 08:55:55 -0700 Changes affecting future time stamps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ialloc.c new/ialloc.c --- old/ialloc.c 2014-08-25 17:19:47.000000000 +0200 +++ new/ialloc.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,32 +0,0 @@ -/* -** This file is in the public domain, so clarified as of -** 2006-07-17 by Arthur David Olson. -*/ - -/*LINTLIBRARY*/ - -#include "private.h" - -char * -icatalloc(char *const old, const char *const new) -{ - register char * result; - register int oldsize, newsize; - - newsize = (new == NULL) ? 0 : strlen(new); - if (old == NULL) - oldsize = 0; - else if (newsize == 0) - return old; - else oldsize = strlen(old); - if ((result = realloc(old, oldsize + newsize + 1)) != NULL) - if (new != NULL) - strcpy(result + oldsize, new); - return result; -} - -char * -icpyalloc(const char *const string) -{ - return icatalloc(NULL, string); -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/private.h new/private.h --- old/private.h 2015-03-11 04:48:29.000000000 +0100 +++ new/private.h 2015-04-20 08:12:58.000000000 +0200 @@ -42,6 +42,10 @@ #define HAVE_SETTIMEOFDAY 3 #endif /* !defined HAVE_SETTIMEOFDAY */ +#ifndef HAVE_STRDUP +#define HAVE_STRDUP 1 +#endif + #ifndef HAVE_SYMLINK #define HAVE_SYMLINK 1 #endif /* !defined HAVE_SYMLINK */ @@ -449,14 +453,6 @@ #endif /* -** Private function declarations. -*/ - -char * icatalloc(char * old, const char * new); -char * icpyalloc(const char * string); -const char * scheck(const char * string, const char * format); - -/* ** Finally, some convenience items. */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/scheck.c new/scheck.c --- old/scheck.c 2013-05-28 06:26:18.000000000 +0200 +++ new/scheck.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,64 +0,0 @@ -/* -** This file is in the public domain, so clarified as of -** 2006-07-17 by Arthur David Olson. -*/ - -/*LINTLIBRARY*/ - -#include "private.h" - -const char * -scheck(const char *const string, const char *const format) -{ - register char * fbuf; - register const char * fp; - register char * tp; - register int c; - register const char * result; - char dummy; - - result = ""; - if (string == NULL || format == NULL) - return result; - fbuf = malloc(2 * strlen(format) + 4); - if (fbuf == NULL) - return result; - fp = format; - tp = fbuf; - - /* - ** Copy directives, suppressing each conversion that is not - ** already suppressed. Scansets containing '%' are not - ** supported; e.g., the conversion specification "%[%]" is not - ** supported. Also, multibyte characters containing a - ** non-leading '%' byte are not supported. - */ - while ((*tp++ = c = *fp++) != '\0') { - if (c != '%') - continue; - if (is_digit(*fp)) { - char const *f = fp; - char *t = tp; - do { - *t++ = c = *f++; - } while (is_digit(c)); - if (c == '$') { - fp = f; - tp = t; - } - } - *tp++ = '*'; - if (*fp == '*') - ++fp; - if ((*tp++ = *fp++) == '\0') - break; - } - - *(tp - 1) = '%'; - *tp++ = 'c'; - *tp = '\0'; - if (sscanf(string, fbuf, &dummy) != 1) - result = format; - free(fbuf); - return result; -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/zic.c new/zic.c --- old/zic.c 2014-08-25 22:39:03.000000000 +0200 +++ new/zic.c 2015-04-20 08:12:58.000000000 +0200 @@ -31,8 +31,6 @@ #define MKDIR_UMASK 0755 #endif -#define end(cp) (strchr((cp), '\0')) - struct rule { const char * r_filename; int r_linenum; @@ -368,18 +366,40 @@ return nitems * itemsize; } +#if !HAVE_STRDUP +static char * +strdup(char const *str) +{ + char *result = malloc(strlen(str) + 1); + return result ? strcpy(result, str) : result; +} +#endif + static ATTRIBUTE_PURE void * -memcheck(void *const ptr) +memcheck(void *ptr) { if (ptr == NULL) memory_exhausted(strerror(errno)); return ptr; } -#define emalloc(size) memcheck(malloc(size)) -#define erealloc(ptr, size) memcheck(realloc(ptr, size)) -#define ecpyalloc(ptr) memcheck(icpyalloc(ptr)) -#define ecatalloc(oldp, newp) memcheck(icatalloc((oldp), (newp))) +static void * +emalloc(size_t size) +{ + return memcheck(malloc(size)); +} + +static void * +erealloc(void *ptr, size_t size) +{ + return memcheck(realloc(ptr, size)); +} + +static char * +ecpyalloc (char const *str) +{ + return memcheck(strdup(str)); +} static void * growalloc(void *ptr, size_t itemsize, int nitems, int *nitems_alloc) @@ -634,6 +654,11 @@ { enum { component_len_max = 14 }; size_t component_len = component_end - component; + if (component_len == 0) { + fprintf(stderr, _("%s: file name '%s' contains empty component"), + progname, name); + exit(EXIT_FAILURE); + } if (0 < component_len && component_len <= 2 && component[0] == '.' && component_end[-1] == '.') { fprintf(stderr, _("%s: file name '%s' contains" @@ -686,6 +711,21 @@ componentcheck(name, component, cp); } +static char * +relname(char const *dir, char const *base) +{ + if (*base == '/') + return ecpyalloc(base); + else { + size_t dir_len = strlen(dir); + bool needs_slash = dir_len && dir[dir_len - 1] != '/'; + char *result = emalloc(dir_len + needs_slash + strlen(base) + 1); + result[dir_len] = '/'; + strcpy(result + dir_len + needs_slash, base); + return memcpy(result, dir, dir_len); + } +} + static void dolink(const char *const fromfield, const char *const tofield) { @@ -694,20 +734,8 @@ register int fromisdir; namecheck(tofield); - if (fromfield[0] == '/') - fromname = ecpyalloc(fromfield); - else { - fromname = ecpyalloc(directory); - fromname = ecatalloc(fromname, "/"); - fromname = ecatalloc(fromname, fromfield); - } - if (tofield[0] == '/') - toname = ecpyalloc(tofield); - else { - toname = ecpyalloc(directory); - toname = ecatalloc(toname, "/"); - toname = ecatalloc(toname, tofield); - } + fromname = relname(directory, fromfield); + toname = relname(directory, tofield); /* ** We get to be careful here since ** there's a fair chance of root running us. @@ -731,6 +759,8 @@ if (result != 0) { const char *s = fromfield; const char *t; + char *p; + size_t dotdots = 0; register char * symlinkcontents = NULL; do @@ -739,13 +769,13 @@ && ! strncmp (fromfield, tofield, ++s - fromfield)); - for (s = tofield + (t - fromfield); - (s = strchr(s, '/')); - s++) - symlinkcontents = - ecatalloc(symlinkcontents, - "../"); - symlinkcontents = ecatalloc(symlinkcontents, t); + for (s = tofield + (t - fromfield); *s; s++) + dotdots += *s == '/'; + symlinkcontents + = emalloc(3 * dotdots + strlen(t) + 1); + for (p = symlinkcontents; dotdots-- != 0; p += 3) + memcpy(p, "../", 3); + strcpy(p, t); result = symlink(symlinkcontents, toname); if (result == 0) warning(_("hard link failed, symbolic link used")); @@ -828,7 +858,7 @@ return S_ISDIR(st.st_mode) != 0; #else { - char *nameslashdot = ecatalloc(ecpyalloc(name), "/."); + char *nameslashdot = relname(name, "."); res = stat(nameslashdot, &st); free(nameslashdot); return res == 0; @@ -1023,6 +1053,7 @@ { zic_t hh; int mm, ss, sign; + char xs; if (string == NULL || *string == '\0') return 0; @@ -1032,12 +1063,12 @@ sign = -1; ++string; } else sign = 1; - if (sscanf(string, scheck(string, "%"SCNdZIC), &hh) == 1) + if (sscanf(string, "%"SCNdZIC"%c", &hh, &xs) == 1) mm = ss = 0; - else if (sscanf(string, scheck(string, "%"SCNdZIC":%d"), &hh, &mm) == 2) + else if (sscanf(string, "%"SCNdZIC":%d%c", &hh, &mm, &xs) == 2) ss = 0; - else if (sscanf(string, scheck(string, "%"SCNdZIC":%d:%d"), - &hh, &mm, &ss) != 3) { + else if (sscanf(string, "%"SCNdZIC":%d:%d%c", &hh, &mm, &ss, &xs) + != 3) { error("%s", errstring); return 0; } @@ -1215,6 +1246,7 @@ int month, day; zic_t dayoff, tod; zic_t t; + char xs; if (nfields != LEAP_FIELDS) { error(_("wrong number of fields on Leap line")); @@ -1222,7 +1254,7 @@ } dayoff = 0; cp = fields[LP_YEAR]; - if (sscanf(cp, scheck(cp, "%"SCNdZIC), &year) != 1) { + if (sscanf(cp, "%"SCNdZIC"%c", &year, &xs) != 1) { /* ** Leapin' Lizards! */ @@ -1257,7 +1289,7 @@ ++j; } cp = fields[LP_DAY]; - if (sscanf(cp, scheck(cp, "%d"), &day) != 1 || + if (sscanf(cp, "%d%c", &day, &xs) != 1 || day <= 0 || day > len_months[isleap(year)][month]) { error(_("invalid day of month")); return; @@ -1347,6 +1379,7 @@ register const char * cp; register char * dp; register char * ep; + char xs; if ((lp = byword(monthp, mon_names)) == NULL) { error(_("invalid month name")); @@ -1398,7 +1431,7 @@ _("%s: panic: Invalid l_value %d\n"), progname, lp->l_value); exit(EXIT_FAILURE); - } else if (sscanf(cp, scheck(cp, "%"SCNdZIC), &rp->r_loyear) != 1) { + } else if (sscanf(cp, "%"SCNdZIC"%c", &rp->r_loyear, &xs) != 1) { error(_("invalid starting year")); return; } @@ -1420,7 +1453,7 @@ _("%s: panic: Invalid l_value %d\n"), progname, lp->l_value); exit(EXIT_FAILURE); - } else if (sscanf(cp, scheck(cp, "%"SCNdZIC), &rp->r_hiyear) != 1) { + } else if (sscanf(cp, "%"SCNdZIC"%c", &rp->r_hiyear, &xs) != 1) { error(_("invalid ending year")); return; } @@ -1473,7 +1506,7 @@ } rp->r_wday = lp->l_value; } - if (sscanf(ep, scheck(ep, "%d"), &rp->r_dayofmonth) != 1 || + if (sscanf(ep, "%d%c", &rp->r_dayofmonth, &xs) != 1 || rp->r_dayofmonth <= 0 || (rp->r_dayofmonth > len_months[1][rp->r_month])) { error(_("invalid day of month")); @@ -1547,7 +1580,7 @@ register int leapcnt32, leapi32; register int timecnt32, timei32; register int pass; - static char * fullname; + char * fullname; static const struct tzhead tzh0; static struct tzhead tzh; zic_t *ats = emalloc(size_product(timecnt, sizeof *ats + 1)); @@ -1633,9 +1666,7 @@ --leapcnt32; ++leapi32; } - fullname = erealloc(fullname, - strlen(directory) + 1 + strlen(name) + 1); - sprintf(fullname, "%s/%s", directory, name); + fullname = relname(directory, name); /* ** Remove old file, if any, to snap links. */ @@ -1850,15 +1881,16 @@ fprintf(fp, "\n%s\n", string); close_file(fp, fullname); free(ats); + free(fullname); } -static void +static size_t doabbr(char *const abbr, const char *const format, const char *const letters, bool isdst, bool doquotes) { register char * cp; register char * slashp; - register int len; + register size_t len; slashp = strchr(format, '/'); if (slashp == NULL) { @@ -1871,18 +1903,18 @@ memcpy(abbr, format, slashp - format); abbr[slashp - format] = '\0'; } + len = strlen(abbr); if (!doquotes) - return; + return len; for (cp = abbr; is_alpha(*cp); cp++) continue; - len = strlen(abbr); if (len > 0 && *cp == '\0') - return; + return len; abbr[len + 2] = '\0'; abbr[len + 1] = '>'; - for ( ; len > 0; --len) - abbr[len] = abbr[len - 1]; + memmove(abbr + 1, abbr, len); abbr[0] = '<'; + return len + 2; } static void @@ -1894,17 +1926,18 @@ max_year = x; } -static bool +static int stringoffset(char *result, zic_t offset) { register int hours; register int minutes; register int seconds; + bool negative = offset < 0; + int len = negative; - result[0] = '\0'; - if (offset < 0) { - strcpy(result, "-"); + if (negative) { offset = -offset; + result[0] = '-'; } seconds = offset % SECSPERMIN; offset /= SECSPERMIN; @@ -1913,15 +1946,15 @@ hours = offset; if (hours >= HOURSPERDAY * DAYSPERWEEK) { result[0] = '\0'; - return false; + return 0; } - sprintf(end(result), "%d", hours); + len += sprintf(result + len, "%d", hours); if (minutes != 0 || seconds != 0) { - sprintf(end(result), ":%02d", minutes); + len += sprintf(result + len, ":%02d", minutes); if (seconds != 0) - sprintf(end(result), ":%02d", seconds); + len += sprintf(result + len, ":%02d", seconds); } - return true; + return len; } static int @@ -1931,7 +1964,6 @@ register zic_t tod = rp->r_tod; register int compat = 0; - result = end(result); if (rp->r_dycode == DC_DOM) { register int month, total; @@ -1942,9 +1974,9 @@ total += len_months[0][month]; /* Omit the "J" in Jan and Feb, as that's shorter. */ if (rp->r_month <= 1) - sprintf(result, "%d", total + rp->r_dayofmonth - 1); + result += sprintf(result, "%d", total + rp->r_dayofmonth - 1); else - sprintf(result, "J%d", total + rp->r_dayofmonth); + result += sprintf(result, "J%d", total + rp->r_dayofmonth); } else { register int week; register int wday = rp->r_wday; @@ -1971,16 +2003,16 @@ } else return -1; /* "cannot happen" */ if (wday < 0) wday += DAYSPERWEEK; - sprintf(result, "M%d.%d.%d", - rp->r_month + 1, week, wday); + result += sprintf(result, "M%d.%d.%d", + rp->r_month + 1, week, wday); } if (rp->r_todisgmt) tod += gmtoff; if (rp->r_todisstd && rp->r_stdoff == 0) tod += dstoff; if (tod != 2 * SECSPERMIN * MINSPERHOUR) { - strcat(result, "/"); - if (! stringoffset(end(result), tod)) + *result++ = '/'; + if (! stringoffset(result, tod)) return -1; if (tod < 0) { if (compat < 2013) @@ -2020,6 +2052,8 @@ register const char * abbrvar; register int compat = 0; register int c; + size_t len; + int offsetlen; struct rule stdr, dstr; result[0] = '\0'; @@ -2087,30 +2121,36 @@ if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0)) return -1; abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar; - doabbr(result, zp->z_format, abbrvar, false, true); - if (! stringoffset(end(result), -zp->z_gmtoff)) { + len = doabbr(result, zp->z_format, abbrvar, false, true); + offsetlen = stringoffset(result + len, -zp->z_gmtoff); + if (! offsetlen) { result[0] = '\0'; return -1; } + len += offsetlen; if (dstrp == NULL) return compat; - doabbr(end(result), zp->z_format, dstrp->r_abbrvar, true, true); - if (dstrp->r_stdoff != SECSPERMIN * MINSPERHOUR) - if (! stringoffset(end(result), - -(zp->z_gmtoff + dstrp->r_stdoff))) { - result[0] = '\0'; - return -1; - } - strcat(result, ","); - c = stringrule(result, dstrp, dstrp->r_stdoff, zp->z_gmtoff); + len += doabbr(result + len, zp->z_format, dstrp->r_abbrvar, true, true); + if (dstrp->r_stdoff != SECSPERMIN * MINSPERHOUR) { + offsetlen = stringoffset(result + len, + -(zp->z_gmtoff + dstrp->r_stdoff)); + if (! offsetlen) { + result[0] = '\0'; + return -1; + } + len += offsetlen; + } + result[len++] = ','; + c = stringrule(result + len, dstrp, dstrp->r_stdoff, zp->z_gmtoff); if (c < 0) { result[0] = '\0'; return -1; } if (compat < c) compat = c; - strcat(result, ","); - c = stringrule(result, stdrp, dstrp->r_stdoff, zp->z_gmtoff); + len += strlen(result + len); + result[len++] = ','; + c = stringrule(result + len, stdrp, dstrp->r_stdoff, zp->z_gmtoff); if (c < 0) { result[0] = '\0'; return -1; @@ -2718,28 +2758,38 @@ return array; } +static _Noreturn void +time_overflow(void) +{ + error(_("time overflow")); + exit(EXIT_FAILURE); +} + static ATTRIBUTE_PURE zic_t oadd(const zic_t t1, const zic_t t2) { - if (t1 < 0 ? t2 < ZIC_MIN - t1 : ZIC_MAX - t1 < t2) { - error(_("time overflow")); - exit(EXIT_FAILURE); - } + if (t1 < 0 ? t2 < ZIC_MIN - t1 : ZIC_MAX - t1 < t2) + time_overflow(); return t1 + t2; } static ATTRIBUTE_PURE zic_t tadd(const zic_t t1, const zic_t t2) { - if (t1 == max_time && t2 > 0) - return max_time; - if (t1 == min_time && t2 < 0) - return min_time; - if (t1 < 0 ? t2 < min_time - t1 : max_time - t1 < t2) { - error(_("time overflow")); - exit(EXIT_FAILURE); - } - return t1 + t2; + if (t1 < 0) { + if (t2 < min_time - t1) { + if (t1 != min_time) + time_overflow(); + return min_time; + } + } else { + if (max_time - t1 < t2) { + if (t1 != max_time) + time_overflow(); + return max_time; + } + } + return t1 + t2; } /* ++++++ tzdata-china.diff ++++++ --- /var/tmp/diff_new_pack.coXBKn/_old 2015-05-22 16:26:58.000000000 +0200 +++ /var/tmp/diff_new_pack.coXBKn/_new 2015-05-22 16:26:58.000000000 +0200 @@ -1,8 +1,8 @@ -Index: timezone-2014i/asia +Index: timezone-2015d/asia =================================================================== ---- timezone-2014i.orig/asia -+++ timezone-2014i/asia -@@ -520,6 +520,10 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: +--- timezone-2015d.orig/asia ++++ timezone-2015d/asia +@@ -516,6 +516,10 @@ Rule PRC 1987 1991 - Apr Sun>=10 0:00 1: Zone Asia/Shanghai 8:05:43 - LMT 1901 8:00 Shang C%sT 1949 8:00 PRC C%sT @@ -13,11 +13,11 @@ # Xinjiang time, used by many in western China; represented by Ürümqi / Ürümchi # / Wulumuqi. (Please use Asia/Shanghai if you prefer Beijing time.) Zone Asia/Urumqi 5:50:20 - LMT 1928 -Index: timezone-2014i/backward +Index: timezone-2015d/backward =================================================================== ---- timezone-2014i.orig/backward -+++ timezone-2014i/backward -@@ -92,7 +92,7 @@ Link America/Mexico_City Mexico/General +--- timezone-2015d.orig/backward ++++ timezone-2015d/backward +@@ -93,7 +93,7 @@ Link America/Mexico_City Mexico/General Link Pacific/Auckland NZ Link Pacific/Chatham NZ-CHAT Link America/Denver Navajo @@ -26,10 +26,10 @@ Link Pacific/Pohnpei Pacific/Ponape Link Pacific/Pago_Pago Pacific/Samoa Link Pacific/Chuuk Pacific/Truk -Index: timezone-2014i/zone.tab +Index: timezone-2015d/zone.tab =================================================================== ---- timezone-2014i.orig/zone.tab -+++ timezone-2014i/zone.tab +--- timezone-2015d.orig/zone.tab ++++ timezone-2015d/zone.tab @@ -143,6 +143,7 @@ CK -2114-15946 Pacific/Rarotonga CL -3327-07040 America/Santiago most locations CL -2709-10926 Pacific/Easter Easter Island ++++++ tzdata2015c.tar.gz -> tzdata2015d.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Makefile new/Makefile --- old/Makefile 2015-04-11 17:57:06.000000000 +0200 +++ new/Makefile 2015-04-24 17:11:35.000000000 +0200 @@ -5,7 +5,7 @@ PACKAGE= tzcode # Version numbers of the code and data distributions. -VERSION= 2015c +VERSION= 2015d # Email address for bug reports. BUGEMAIL= [email protected] @@ -120,6 +120,7 @@ # -DHAVE_STDINT_H=1 if you have a pre-C99 compiler with "stdint.h" # -DHAVE_STRFTIME_L=1 if <time.h> declares locale_t and strftime_l # This defaults to 0 if _POSIX_VERSION < 200809, 1 otherwise. +# -DHAVE_STRDUP=0 if your system lacks the strdup function # -DHAVE_SYMLINK=0 if your system lacks the symlink function # -DHAVE_SYS_STAT_H=0 if your compiler lacks a "sys/stat.h" # -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h" @@ -330,13 +331,13 @@ # ':' on typical hosts; 'ranlib' on the ancient hosts that still need ranlib. RANLIB= : -TZCOBJS= zic.o scheck.o ialloc.o +TZCOBJS= zic.o TZDOBJS= zdump.o localtime.o asctime.o DATEOBJS= date.o localtime.o strftime.o asctime.o LIBSRCS= localtime.c asctime.c difftime.c LIBOBJS= localtime.o asctime.o difftime.o HEADERS= tzfile.h private.h -NONLIBSRCS= zic.c zdump.c scheck.c ialloc.c +NONLIBSRCS= zic.c zdump.c NEWUCBSRCS= date.c strftime.c SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ tzselect.ksh workman.sh @@ -654,9 +655,7 @@ asctime.o: private.h tzfile.h date.o: private.h difftime.o: private.h -ialloc.o: private.h localtime.o: private.h tzfile.h -scheck.o: private.h strftime.o: private.h tzfile.h zdump.o: version.h zic.o: private.h tzfile.h version.h diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/NEWS new/NEWS --- old/NEWS 2015-04-11 17:57:06.000000000 +0200 +++ new/NEWS 2015-04-24 17:11:35.000000000 +0200 @@ -1,5 +1,31 @@ News for the tz database +Release 2015d - 2015-04-24 08:09:46 -0700 + + Changes affecting future time stamps + + Egypt will not observe DST in 2015 and will consider canceling it + permanently. For now, assume no DST indefinitely. + (Thanks to Ahmed Nazmy and Tim Parenti.) + + Changes affecting past time stamps + + America/Whitehorse switched from UTC-9 to UTC-8 on 1967-05-28, not + 1966-07-01. Also, Yukon's time zone history is documented better. + (Thanks to Brian Inglis and Dennis Ferguson.) + + Change affecting past and future time zone abbreviations + + The abbreviations for Hawaii-Aleutian standard and daylight times + have been changed from HAST/HADT to HST/HDT, as per US Government + Printing Office style. This affects only America/Adak since 1983, + as America/Honolulu was already using the new style. + + Changes affecting code + + zic has some minor performance improvements. + + Release 2015c - 2015-04-11 08:55:55 -0700 Changes affecting future time stamps diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/africa new/africa --- old/africa 2015-04-08 19:29:46.000000000 +0200 +++ new/africa 2015-04-21 08:36:37.000000000 +0200 @@ -328,35 +328,20 @@ # http://almogaz.com/news/weird-news/2015/04/05/1947105 ... # http://www.timeanddate.com/news/time/egypt-starts-dst-2015.html -# From Paul Eggert (2015-04-08): -# For now, guess that later spring and fall transitions will use -# 2014's rules, and guess that Egypt will switch to standard time at -# 24:00 the last Thursday before Ramadan, and back to DST at 00:00 the -# first Friday after Ramadan. To implement this, -# transition dates for 2015 through 2037 were determined by running -# the following program under GNU Emacs 24.4, with the results integrated -# by hand into the table below. Ramadan again intrudes on the guessed -# DST starting in 2038, but that's beyond our somewhat-arbitrary cutoff. -# (let ((islamic-year 1436)) -# (while (< islamic-year 1460) -# (let ((a (calendar-islamic-to-absolute (list 9 1 islamic-year))) -# (b (calendar-islamic-to-absolute (list 10 1 islamic-year))) -# (friday 5)) -# (while (/= friday (mod a 7)) -# (setq a (1- a))) -# (while (/= friday (mod b 7)) -# (setq b (1+ b))) -# (setq a (1- a)) -# (setq b (1- b)) -# (setq a (calendar-gregorian-from-absolute a)) -# (setq b (calendar-gregorian-from-absolute b)) -# (insert -# (format -# (concat "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t0\t-\n" -# "Rule\tEgypt\t%d\tonly\t-\t%s\t%2d\t24:00\t1:00\tS\n") -# (car (cdr (cdr a))) (calendar-month-name (car a) t) (car (cdr a)) -# (car (cdr (cdr b))) (calendar-month-name (car b) t) (car (cdr b))))) -# (setq islamic-year (+ 1 islamic-year)))) +# From Ahmed Nazmy (2015-04-20): +# Egypt's ministers cabinet just announced ... that it will cancel DST at +# least for 2015. +# +# From Tim Parenti (2015-04-20): +# http://english.ahram.org.eg/WriterArticles/NewsContentP/1/128195/Egypt/No-daylight-saving-this-summer-Egypts-prime-minist.aspx +# "Egypt's cabinet agreed on Monday not to switch clocks for daylight saving +# time this summer, and carry out studies on the possibility of canceling the +# practice altogether in future years." +# +# From Paul Eggert (2015-04-20): +# For now, assume DST will be canceled. Any resumption would likely +# use different rules anyway. + Rule Egypt 2008 only - Aug lastThu 24:00 0 - Rule Egypt 2009 only - Aug 20 24:00 0 - Rule Egypt 2010 only - Aug 10 24:00 0 - @@ -365,22 +350,7 @@ Rule Egypt 2014 only - May 15 24:00 1:00 S Rule Egypt 2014 only - Jun 26 24:00 0 - Rule Egypt 2014 only - Jul 31 24:00 1:00 S -Rule Egypt 2014 max - Sep lastThu 24:00 0 - -Rule Egypt 2015 2019 - Apr lastThu 24:00 1:00 S -Rule Egypt 2015 only - Jun 11 24:00 0 - -Rule Egypt 2015 only - Jul 23 24:00 1:00 S -Rule Egypt 2016 only - Jun 2 24:00 0 - -Rule Egypt 2016 only - Jul 7 24:00 1:00 S -Rule Egypt 2017 only - May 25 24:00 0 - -Rule Egypt 2017 only - Jun 29 24:00 1:00 S -Rule Egypt 2018 only - May 10 24:00 0 - -Rule Egypt 2018 only - Jun 14 24:00 1:00 S -Rule Egypt 2019 only - May 2 24:00 0 - -Rule Egypt 2019 only - Jun 6 24:00 1:00 S -Rule Egypt 2020 only - May 28 24:00 1:00 S -Rule Egypt 2021 only - May 13 24:00 1:00 S -Rule Egypt 2022 only - May 5 24:00 1:00 S -Rule Egypt 2023 max - Apr lastThu 24:00 1:00 S +Rule Egypt 2014 only - Sep lastThu 24:00 0 - # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Africa/Cairo 2:05:09 - LMT 1900 Oct diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/northamerica new/northamerica --- old/northamerica 2015-03-24 21:13:19.000000000 +0100 +++ new/northamerica 2015-04-18 04:10:32.000000000 +0200 @@ -227,9 +227,14 @@ # The law doesn't give abbreviations. # # From Paul Eggert (2000-01-08), following a heads-up from Rives McDow: -# Public law 106-564 (2000-12-23) introduced the abbreviation -# "Chamorro Standard Time" for time in Guam and the Northern Marianas. -# See the file "australasia". +# Public law 106-564 (2000-12-23) introduced ... "Chamorro Standard Time" +# for time in Guam and the Northern Marianas. See the file "australasia". +# +# From Paul Eggert (2015-04-17): +# HST and HDT are standardized abbreviations for Hawaii-Aleutian +# standard and daylight times. See section 9.47 (p 234) of the +# U.S. Government Printing Office Style Manual (2008) +# http://www.gpo.gov/fdsys/pkg/GPO-STYLEMANUAL-2008/pdf/GPO-STYLEMANUAL-2008.pdf # From Arthur David Olson, 2005-08-09 # The following was signed into law on 2005-08-08. @@ -536,7 +541,7 @@ -11:00 - BST 1969 -11:00 US B%sT 1983 Oct 30 2:00 -10:00 US AH%sT 1983 Nov 30 - -10:00 US HA%sT + -10:00 US H%sT # The following switches don't quite make our 1970 cutoff. # # Shanks writes that part of southwest Alaska (e.g. Aniak) @@ -1841,17 +1846,115 @@ # Dawson switched to PST in 1973. Inuvik switched to MST in 1979. # Mathew Englander (1996-10-07) gives the following refs: # * 1967. Paragraph 28(34)(g) of the Interpretation Act, S.C. 1967-68, -# c. 7 defines Yukon standard time as UTC-9. This is still valid; +# c. 7 defines Yukon standard time as UTC-9.... # see Interpretation Act, R.S.C. 1985, c. I-21, s. 35(1). +# [http://canlii.ca/t/7vhg] # * C.O. 1973/214 switched Yukon to PST on 1973-10-28 00:00. # * O.I.C. 1980/02 established DST. # * O.I.C. 1987/056 changed DST to Apr firstSun 2:00 to Oct lastSun 2:00. -# Shanks & Pottenger say Yukon's 1973-10-28 switch was at 2:00; go -# with Englander. -# From Chris Walton (2006-06-26): -# Here is a link to the old daylight saving portion of the interpretation -# act which was last updated in 1987: -# http://www.gov.yk.ca/legislation/regs/oic1987_056.pdf + +# From Brian Inglis (2015-04-14): +# +# I tried to trace the history of Yukon time and found the following +# regulations, giving the reference title and URL if found, regulation name, +# and relevant quote if available. Each regulation specifically revokes its +# predecessor. The final reference is to the current Interpretation Act +# authorizing and resulting from these regulatory changes. +# +# Only recent regulations were retrievable via Yukon government site search or +# index, and only some via Canadian legal sources. Other sources used include +# articles titled "Standard Time and Time Zones in Canada" from JRASC via ADS +# Abstracts, cited by ADO for 1932 ..., and updated versions from 1958 and +# 1970 quoted below; each article includes current extracts from provincial +# and territorial ST and DST regulations at the end, summaries and details of +# standard times and daylight saving time at many locations across Canada, +# with time zone maps, tables and calculations for Canadian Sunrise, Sunset, +# and LMST; they also cover many countries and global locations, with a chart +# and table showing current Universal Time offsets, and may be useful as +# another source of information for 1970 and earlier. +# +# * Standard Time and Time Zones in Canada; Smith, C.C.; JRASC, Vol. 26, +# pp.49-77; February 1932; SAO/NASA Astrophysics Data System (ADS) +# http://adsabs.harvard.edu/abs/1932JRASC..26...49S from p.75: +# Yukon Interpretation Ordinance +# Yukon standard time is the local mean time at the one hundred and +# thirty-fifth meridian. +# +# * Standard Time and Time Zones in Canada; Smith, C.C.; Thomson, Malcolm M.; +# JRASC, Vol. 52, pp.193-223; October 1958; SAO/NASA Astrophysics Data System +# (ADS) http://adsabs.harvard.edu/abs/1958JRASC..52..193S from pp.220-1: +# Yukon Interpretation Ordinance, 1955, Chap. 16. +# +# (1) Subject to this section, standard time shall be reckoned as nine +# hours behind Greenwich Time and called Yukon Standard Time. +# +# (2) Notwithstanding subsection (1), the Commissioner may make regulations +# varying the manner of reckoning standard time. +# +# * Yukon Territory Commissioner's Order 1966-20 Interpretation Ordinance +# http://? - no online source found +# +# * Standard Time and Time Zones in Canada; Thomson, Malcolm M.; JRASC, +# Vol. 64, pp.129-162; June 1970; SAO/NASA Astrophysics Data System (ADS) +# http://adsabs.harvard.edu/abs/1970JRASC..64..129T from p.156: Yukon +# Territory Commissioner's Order 1967-59 Interpretation Ordinance ... +# +# 1. Commissioner's Order 1966-20 dated at Whitehorse in the Yukon +# Territory on 27th January, 1966, is hereby revoked. +# +# 2. Yukon (East) Standard Time as defined by section 36 of the +# Interpretation Ordinance from and after mid-night on the 28th day of May, +# 1967 shall be reckoned in the same manner as Pacific Standard Time, that +# is to say, eight hours behind Greenwich Time in the area of the Yukon +# Territory lying east of the 138th degree longitude west. +# +# 3. In the remainder of the Territory, lying west of the 138th degree +# longitude west, Yukon (West) Standard Time shall be reckoned as nine +# hours behind Greenwich Time. +# +# * Yukon Standard Time defined as Pacific Standard Time, YCO 1973/214 +# http://www.canlii.org/en/yk/laws/regu/yco-1973-214/latest/yco-1973-214.html +# C.O. 1973/214 INTERPRETATION ACT ... +# +# 1. Effective October 28, 1973 Commissioner's Order 1967/59 is hereby +# revoked. +# +# 2. Yukon Standard Time as defined by section 36 of the Interpretation +# Act from and after midnight on the twenty-eighth day of October, 1973 +# shall be reckoned in the same manner as Pacific Standard Time, that is +# to say eight hours behind Greenwich Time. +# +# * O.I.C. 1980/02 INTERPRETATION ACT +# http://? - no online source found +# +# * Yukon Daylight Saving Time, YOIC 1987/56 +# http://www.canlii.org/en/yk/laws/regu/yoic-1987-56/latest/yoic-1987-56.html +# O.I.C. 1987/056 INTERPRETATION ACT ... +# +# In every year between +# (a) two o'clock in the morning in the first Sunday in April, and +# (b) two o'clock in the morning in the last Sunday in October, +# Standard Time shall be reckoned as seven hours behind Greenwich Time and +# called Yukon Daylight Saving Time. +# ... +# Dated ... 9th day of March, A.D., 1987. +# +# * Yukon Daylight Saving Time 2006, YOIC 2006/127 +# http://www.canlii.org/en/yk/laws/regu/yoic-2006-127/latest/yoic-2006-127.html +# O.I.C. 2006/127 INTERPRETATION ACT ... +# +# 1. In Yukon each year the time for general purposes shall be 7 hours +# behind Greenwich mean time during the period commencing at two o'clock +# in the forenoon on the second Sunday of March and ending at two o'clock +# in the forenoon on the first Sunday of November and shall be called +# Yukon Daylight Saving Time. +# +# 2. Order-in-Council 1987/56 is revoked. +# +# 3. This order comes into force January 1, 2007. +# +# * Interpretation Act, RSY 2002, c 125 +# http://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html # From Rives McDow (1999-09-04): # Nunavut ... moved ... to incorporate the whole territory into one time zone. @@ -2077,7 +2180,7 @@ -7:00 NT_YK M%sT 1980 -7:00 Canada M%sT Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20 - -9:00 NT_YK Y%sT 1966 Jul 1 2:00 + -9:00 NT_YK Y%sT 1967 May 28 0:00 -8:00 NT_YK P%sT 1980 -8:00 Canada P%sT Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
