[PATCH 1/4] * date.c: Pacify GCC 4.7.3.
(atof, getlogin, mktime, strchr, time, strftime): Remove old-style declarations. GCC 4.7.3 warns about them, and they aren't needed nowadays anyway. (main) [HAVE_SETTIMEOFDAY != 2]: "Use" dsttime and minuteswest to pacify GCC 4.7.3. --- date.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/date.c b/date.c index 047969f..bae90f3 100644 --- a/date.c +++ b/date.c @@ -54,14 +54,9 @@ static char sccsid[] = "@(#)date.c 4.23 (Berkeley) 9/20/88"; #define SECSPERMIN 60 #endif /* !defined SECSPERMIN */ -extern double atof(); extern char ** environ; -extern char * getlogin(); -extern time_t mktime(); extern char * optarg; extern int optind; -extern char * strchr(); -extern time_t time(); extern char * tzname[2]; static int retval = EXIT_SUCCESS; @@ -270,6 +265,8 @@ _("date: error: multiple values in command line\n")); oops("settimeofday"); #endif /* HAVE_SETTIMEOFDAY == 2 */ #if HAVE_SETTIMEOFDAY != 2 + (void) dsttime; + (void) minuteswest; (void) fprintf(stderr, _("date: warning: kernel doesn't keep -d/-t information, option ignored\n")); #endif /* HAVE_SETTIMEOFDAY != 2 */ @@ -543,8 +540,6 @@ display(const char *const format) exit(retval); } -extern size_t strftime(); - #define INCR 1024 static void -- 1.8.1.2
(tmcomp): Don't mess up when atmp->tm_year - btmp->tm_year overflows. This can happen when mktime is invoked on a struct tm with tm_year equal to INT_MIN. --- localtime.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/localtime.c b/localtime.c index 3814a6a..9600901 100644 --- a/localtime.c +++ b/localtime.c @@ -1709,8 +1709,9 @@ tmcomp(register const struct tm *const atmp, { register int result; - if ((result = (atmp->tm_year - btmp->tm_year)) == 0 && - (result = (atmp->tm_mon - btmp->tm_mon)) == 0 && + if (atmp->tm_year != btmp->tm_year) + return atmp->tm_year < btmp->tm_year ? -1 : 1; + if ((result = (atmp->tm_mon - btmp->tm_mon)) == 0 && (result = (atmp->tm_mday - btmp->tm_mday)) == 0 && (result = (atmp->tm_hour - btmp->tm_hour)) == 0 && (result = (atmp->tm_min - btmp->tm_min)) == 0) -- 1.8.1.2
* date.1: Document -r. * date.c (main, usage): Support -r. (main, reset): Remove EBUG code. (display): New argument NOW. Do not exit; that's now the caller's responsibility. All callers changed. (display, timeout, convert, checkfinal, iffy): Don't assume that localtime and gmtime succeed. This prevents a core dump for, e.g., 'date -r 0xffffffffffffffff'. * private.h: Include float.h. (strtoimax): New macro, for pre-C99 systems that lack strtoimax. (time_t_min, time_t_max): New constants, from zdump, with different names to avoid a clash when zdump.c includes private.h. --- date.1 | 11 +++++ date.c | 142 ++++++++++++++++++++++++++++++++++++++------------------------ private.h | 27 ++++++++++++ 3 files changed, 125 insertions(+), 55 deletions(-) diff --git a/date.1 b/date.1 index 408525c..7957f74 100644 --- a/date.1 +++ b/date.1 @@ -10,6 +10,9 @@ date \- show and set date and time ] [ .B \-c ] [ +.B \-r +seconds +] [ .B \-n ] [ .B \-d @@ -133,6 +136,14 @@ These options are available: .BR \-u " or " \-c Use UTC when setting and showing the date and time. .TP +.BI "\-r " seconds +Output the date that corresponds to +.I seconds +past the epoch of 1970-01-01 00:00:00 UTC, where +.I seconds +should be an integer, either decimal, octal (leading 0), or +hexadecimal (leading 0x), preceded by an optional sign. +.TP .B \-n Do not notify other networked systems of the time change. .TP diff --git a/date.c b/date.c index bae90f3..4355a7b 100644 --- a/date.c +++ b/date.c @@ -63,7 +63,7 @@ static int retval = EXIT_SUCCESS; static void checkfinal(const char *, int, time_t, time_t); static time_t convert(const char *, int, time_t); -static void display(const char *); +static void display(const char *, time_t); static void dogmt(void); static void errensure(void); static void iffy(time_t, time_t, const char *, const char *); @@ -89,11 +89,14 @@ main(const int argc, char *argv[]) register int dflag = 0; register int nflag = 0; register int tflag = 0; + register int rflag = 0; register int minuteswest; register int dsttime; register double adjust; time_t now; time_t t; + intmax_t secs; + char * endarg; INITIALIZE(dousg); INITIALIZE(minuteswest); @@ -109,9 +112,9 @@ main(const int argc, char *argv[]) #endif /* defined(TEXTDOMAINDIR) */ (void) textdomain(TZ_DOMAIN); #endif /* HAVE_GETTEXT */ - (void) time(&now); + t = now = time(NULL); format = value = NULL; - while ((ch = getopt(argc, argv, "ucnd:t:a:")) != EOF && ch != -1) { + while ((ch = getopt(argc, argv, "ucr:nd:t:a:")) != EOF && ch != -1) { switch (ch) { default: usage(); @@ -119,6 +122,26 @@ main(const int argc, char *argv[]) case 'c': dogmt(); break; + case 'r': /* seconds since 1970 */ + if (rflag) { + (void) fprintf(stderr, + _("date: error: multiple -r's used")); + usage(); + } + rflag = 1; + errno = 0; + secs = strtoimax (optarg, &endarg, 0); + if (*endarg || optarg == endarg) + errno = EINVAL; + else if (! (time_t_min <= secs && secs <= time_t_max)) + errno = ERANGE; + if (errno) { + perror(optarg); + errensure(); + exit(retval); + } + t = secs; + break; case 'n': /* don't set network */ nflag = 1; break; @@ -183,7 +206,7 @@ main(const int argc, char *argv[]) _("date: error: multiple formats in command line\n")); usage(); } - else if (value == NULL) + else if (value == NULL && !rflag) value = cp; else { (void) fprintf(stderr, @@ -272,28 +295,14 @@ _("date: warning: kernel doesn't keep -d/-t information, option ignored\n")); #endif /* HAVE_SETTIMEOFDAY != 2 */ } - if (value == NULL) - display(format); - - reset(t, nflag); - - checkfinal(value, dousg, t, now); - -#ifdef EBUG - { - struct tm tm; - - tm = *localtime(&t); - timeout(stdout, "%c\n", &tm); - exit(retval); + if (value) { + reset(t, nflag); + checkfinal(value, dousg, t, now); + t = time(NULL); } -#endif /* defined EBUG */ - - display(format); - /* gcc -Wall pacifier */ - for ( ; ; ) - continue; + display(format, t); + return retval; } static void @@ -449,9 +458,6 @@ reset(const time_t newt, const int nflag) register const char * username; static struct timeval tv; /* static so tv_usec is 0 */ -#ifdef EBUG - return; -#endif /* defined EBUG */ username = getlogin(); if (username == NULL || *username == '\0') /* single-user or no tty */ username = "root"; @@ -502,8 +508,10 @@ nondigit(register const char *cp) static void usage(void) { - (void) fprintf(stderr, _("date: usage is date [-u] [-c] [-n] [-d dst] \ -[-t min-west] [-a sss.fff] [[yyyy]mmddhhmm[yyyy][.ss]] [+format]\n")); + (void) fprintf(stderr, + _("date: usage: date [-u] [-c] [-r seconds] [-n]" + " [-d dst] [-t min-west] [-a sss.fff]" + " [[yyyy]mmddhhmm[yyyy][.ss]] [+format]\n")); errensure(); exit(retval); } @@ -517,18 +525,23 @@ oops(const char *const string) errno = e; (void) perror(string); errensure(); - display(NULL); + display(NULL, time(NULL)); + exit(retval); } static void -display(const char *const format) +display(const char *const format, time_t const now) { - struct tm tm; - time_t now; + struct tm *tmp; - (void) time(&now); - tm = *localtime(&now); - timeout(stdout, format ? format : "%+", &tm); + tmp = localtime(&now); + if (!tmp) { + (void) fprintf(stderr, + _("date: error: time out of range\n")); + errensure(); + return; + } + timeout(stdout, format ? format : "%+", tmp); (void) putchar('\n'); (void) fflush(stdout); (void) fflush(stderr); @@ -537,20 +550,27 @@ display(const char *const format) _("date: error: couldn't write results\n")); errensure(); } - exit(retval); } #define INCR 1024 static void -timeout(FILE *const fp, const char *const format, const struct tm *const tmp) +timeout(FILE *const fp, const char *const format, const struct tm *tmp) { char * cp; size_t result; size_t size; + struct tm tm; if (*format == '\0') return; + if (!tmp) { + (void) fprintf(stderr, _("date: error: time out of range\n")); + errensure(); + return; + } + tm = *tmp; + tmp = &tm; size = INCR; cp = malloc(size); for ( ; ; ) { @@ -596,10 +616,13 @@ convert(register const char * const value, const int dousg, const time_t t) register const char * cp; register const char * dotp; register int cent, year_in_cent, month, hour, day, mins, secs; - struct tm tm, outtm; + struct tm tm, outtm, *tmp; time_t outt; - tm = *localtime(&t); + tmp = localtime(&t); + if (!tmp) + return -1; + tm = *tmp; #define DIVISOR 100 year_in_cent = tm.tm_year % DIVISOR + TM_YEAR_BASE % DIVISOR; cent = tm.tm_year / DIVISOR + TM_YEAR_BASE / DIVISOR + @@ -701,7 +724,7 @@ checkfinal(const char * const value, const time_t oldnow) { time_t othert; - struct tm tm; + struct tm tm, *tmp; struct tm othertm; register int pass, offset; @@ -714,8 +737,10 @@ checkfinal(const char * const value, /* ** See if there's both a DST and a STD version. */ - tm = *localtime(&t); - othertm = tm; + tmp = localtime(&t); + if (!tmp) + iffy(t, othert, value, _("time out of range")); + othertm = tm = *tmp; othertm.tm_isdst = !tm.tm_isdst; othert = mktime(&othertm); if (othert != -1 && othertm.tm_isdst != tm.tm_isdst && @@ -748,7 +773,11 @@ checkfinal(const char * const value, else if (pass == 3) othert = t + 60 * offset; else othert = t - 60 * offset; - othertm = *localtime(&othert); + tmp = localtime(&othert); + if (!tmp) + iffy(t, othert, value, + _("time out of range")); + othertm = *tmp; if (sametm(&tm, &othertm)) iffy(t, othert, value, _("multiple matching times exist")); @@ -759,29 +788,32 @@ static void iffy(const time_t thist, const time_t thatt, const char * const value, const char * const reason) { - struct tm tm; + struct tm *tmp; + int dst; (void) fprintf(stderr, _("date: warning: ambiguous time \"%s\", %s.\n"), value, reason); - tm = *gmtime(&thist); + tmp = gmtime(&thist); /* ** Avoid running afoul of SCCS! */ timeout(stderr, _("Time was set as if you used\n\tdate -u %m%d%H\ %M\ -%Y.%S\n"), &tm); - tm = *localtime(&thist); - timeout(stderr, _("to get %c"), &tm); +%Y.%S\n"), tmp); + tmp = localtime(&thist); + dst = tmp ? tmp->tm_isdst : 0; + timeout(stderr, _("to get %c"), tmp); (void) fprintf(stderr, _(" (%s). Use\n"), - tm.tm_isdst ? _("summer time") : _("standard time")); - tm = *gmtime(&thatt); + dst ? _("summer time") : _("standard time")); + tmp = gmtime(&thatt); timeout(stderr, _("\tdate -u %m%d%H\ %M\ -%Y.%S\n"), &tm); - tm = *localtime(&thatt); - timeout(stderr, _("to get %c"), &tm); +%Y.%S\n"), tmp); + tmp = localtime(&thatt); + dst = tmp ? tmp->tm_isdst : 0; + timeout(stderr, _("to get %c"), tmp); (void) fprintf(stderr, _(" (%s).\n"), - tm.tm_isdst ? _("summer time") : _("standard time")); + dst ? _("summer time") : _("standard time")); errensure(); exit(retval); } diff --git a/private.h b/private.h index bf6bad2..5f4384e 100644 --- a/private.h +++ b/private.h @@ -74,6 +74,7 @@ #include "sys/types.h" /* for time_t */ #include "stdio.h" #include "errno.h" +#include "float.h" /* for FLT_MAX and DBL_MAX */ #include "string.h" #include "limits.h" /* for CHAR_BIT et al. */ #include "time.h" @@ -166,6 +167,7 @@ typedef int int_fast32_t; #ifndef INTMAX_MAX # if defined LLONG_MAX || defined __LONG_LONG_MAX__ typedef long long intmax_t; +# define strtoimax strtoll # define PRIdMAX "lld" # ifdef LLONG_MAX # define INTMAX_MAX LLONG_MAX @@ -176,6 +178,7 @@ typedef long long intmax_t; # endif # else typedef long intmax_t; +# define strtoimax strtol # define PRIdMAX "ld" # define INTMAX_MAX LONG_MAX # define INTMAX_MIN LONG_MIN @@ -313,6 +316,30 @@ const char * scheck(const char * string, const char * format); #define TYPE_SIGNED(type) (((type) -1) < 0) #endif /* !defined TYPE_SIGNED */ +/* The minimum and maximum finite time values. */ +static time_t const time_t_min = + ((time_t) 0.5 == 0.5 + ? (sizeof (time_t) == sizeof (float) ? (time_t) -FLT_MAX + : sizeof (time_t) == sizeof (double) ? (time_t) -DBL_MAX + : sizeof (time_t) == sizeof (long double) ? (time_t) -LDBL_MAX + : 0) +#ifndef TIME_T_FLOATING + : (time_t) -1 < 0 + ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1) +#endif + : 0); +static time_t const time_t_max = + ((time_t) 0.5 == 0.5 + ? (sizeof (time_t) == sizeof (float) ? (time_t) FLT_MAX + : sizeof (time_t) == sizeof (double) ? (time_t) DBL_MAX + : sizeof (time_t) == sizeof (long double) ? (time_t) LDBL_MAX + : -1) +#ifndef TIME_T_FLOATING + : (time_t) -1 < 0 + ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)) +#endif + : -1); + /* ** Since the definition of TYPE_INTEGRAL contains floating point numbers, ** it cannot be used in preprocessor directives. -- 1.8.1.2
* backward: Move links here from other files, if the only reason they existed was to fill out zone.tab. Zones are now allowed to cross national borders, so a zone now need not exist merely because there's a national border. Sort the list consistently. None of this changes any time stamp in the database. * checktab.awk: Don't require that zone.tab's column 3 be unique. * europe (Europe/Jersey, Europe/Guernsey, Europe/Isle_of_Man) (Europe/Mariehamn, Europe/Busingen, Europe/Vatican, Europe/San_Marino) (Arctic/Longyearbyen, Europe/Ljubljana, Europe/Podgorica) (Europe/Sarajevo, Europe/Skopje, Europe/Zagreb, Europe/Bratislava): * northamerica (America/St_Barthelemy, America/Marigot): * southamerica (America/Lower_Princes, America/Kralendijk): Move links to 'backward'. * zone.tab: Give more details about how different rows can have duplicate column 1 or column 3. For each link moved to 'backward', change column 3 to be the non-backward name. --- backward | 26 ++++++++++++++++--- checktab.awk | 26 +++++++++---------- europe | 84 ++++++++++++++++++++++++++++-------------------------------- northamerica | 5 +--- southamerica | 10 +++----- zone.tab | 58 ++++++++++++++++++++++------------------- 6 files changed, 110 insertions(+), 99 deletions(-) diff --git a/backward b/backward index dc7769f..791db0c 100644 --- a/backward +++ b/backward @@ -18,19 +18,24 @@ Link America/Indiana/Indianapolis America/Fort_Wayne Link America/Indiana/Indianapolis America/Indianapolis Link America/Argentina/Jujuy America/Jujuy Link America/Indiana/Knox America/Knox_IN +Link America/Curacao America/Kralendijk Link America/Kentucky/Louisville America/Louisville +Link America/Curacao America/Lower_Princes +Link America/Guadeloupe America/Marigot Link America/Argentina/Mendoza America/Mendoza Link America/Rio_Branco America/Porto_Acre Link America/Argentina/Cordoba America/Rosario +Link America/Guadeloupe America/St_Barthelemy Link America/St_Thomas America/Virgin +Link Europe/Oslo Arctic/Longyearbyen Link Asia/Ashgabat Asia/Ashkhabad +Link Asia/Kolkata Asia/Calcutta Link Asia/Chongqing Asia/Chungking Link Asia/Dhaka Asia/Dacca Link Asia/Kathmandu Asia/Katmandu -Link Asia/Kolkata Asia/Calcutta Link Asia/Macau Asia/Macao -Link Asia/Jerusalem Asia/Tel_Aviv Link Asia/Ho_Chi_Minh Asia/Saigon +Link Asia/Jerusalem Asia/Tel_Aviv Link Asia/Thimphu Asia/Thimbu Link Asia/Makassar Asia/Ujung_Pandang Link Asia/Ulaanbaatar Asia/Ulan_Bator @@ -66,7 +71,20 @@ Link America/Havana Cuba Link Africa/Cairo Egypt Link Europe/Dublin Eire Link Europe/London Europe/Belfast +Link Europe/Prague Europe/Bratislava +Link Europe/Zurich Europe/Busingen +Link Europe/London Europe/Guernsey +Link Europe/London Europe/Isle_of_Man +Link Europe/London Europe/Jersey +Link Europe/Belgrade Europe/Ljubljana +Link Europe/Helsinki Europe/Mariehamn +Link Europe/Belgrade Europe/Podgorica +Link Europe/Rome Europe/San_Marino +Link Europe/Belgrade Europe/Sarajevo +Link Europe/Belgrade Europe/Skopje Link Europe/Chisinau Europe/Tiraspol +Link Europe/Rome Europe/Vatican +Link Europe/Belgrade Europe/Zagreb Link Europe/London GB Link Europe/London GB-Eire Link Etc/GMT GMT+0 @@ -88,10 +106,10 @@ Link Pacific/Auckland NZ Link Pacific/Chatham NZ-CHAT Link America/Denver Navajo Link Asia/Shanghai PRC +Link Pacific/Pohnpei Pacific/Ponape Link Pacific/Pago_Pago Pacific/Samoa -Link Pacific/Chuuk Pacific/Yap Link Pacific/Chuuk Pacific/Truk -Link Pacific/Pohnpei Pacific/Ponape +Link Pacific/Chuuk Pacific/Yap Link Europe/Warsaw Poland Link Europe/Lisbon Portugal Link Asia/Taipei ROC diff --git a/checktab.awk b/checktab.awk index c88b12f..5cdce56 100644 --- a/checktab.awk +++ b/checktab.awk @@ -69,13 +69,10 @@ BEGIN { status = 1 } cc0 = cc - if (tz2cc[tz]) { - printf "%s:%d: %s: duplicate TZ column\n", \ - zone_table, zone_NR, tz >>"/dev/stderr" - status = 1 - } - tz2cc[tz] = cc - tz2comments[tz] = comments + cctz = cc tz + cctztab[cctz] = 1 + tztab[tz] = 1 + tz2comments[cctz] = comments tz2NR[tz] = zone_NR if (cc2name[cc]) { cc_used[cc]++ @@ -92,16 +89,19 @@ BEGIN { } } - for (tz in tz2cc) { - if (cc_used[tz2cc[tz]] == 1) { - if (tz2comments[tz]) { + for (cctz in cctztab) { + cc = substr (cctz, 1, 2) + tz = substr (cctz, 3) + if (cc_used[cc] == 1) { + if (tz2comments[cctz]) { printf "%s:%d: unnecessary comment `%s'\n", \ - zone_table, tz2NR[tz], tz2comments[tz] \ + zone_table, tz2NR[tz], \ + tz2comments[cctz] \ >>"/dev/stderr" status = 1 } } else { - if (!tz2comments[tz]) { + if (!tz2comments[cctz]) { printf "%s:%d: missing comment\n", \ zone_table, tz2NR[tz] >>"/dev/stderr" status = 1 @@ -125,7 +125,7 @@ BEGIN { if (src != dst) tz = $3 } if (tz && tz ~ /\//) { - if (!tz2cc[tz]) { + if (!tztab[tz]) { printf "%s: no data for `%s'\n", zone_table, tz \ >>"/dev/stderr" status = 1 diff --git a/europe b/europe index 0f429da..52f15e1 100644 --- a/europe +++ b/europe @@ -42,7 +42,7 @@ # </a> (1998-09-21, in Portuguese) # -# I invented the abbreviations marked `*' in the following table; +# I invented the abbreviations marked '*' in the following table; # the rest are from earlier versions of this file, or from other sources. # Corrections are welcome! # std dst 2dst @@ -96,7 +96,7 @@ # and a sketch map showing some of the sightlines involved. One paragraph # of the text said: # -# `An old stone obelisk marking a forgotten terrestrial meridian stands +# 'An old stone obelisk marking a forgotten terrestrial meridian stands # beside the river at Kew. In the 18th century, before time and longitude # was standardised by the Royal Observatory in Greenwich, scholars observed # this stone and the movement of stars from Kew Observatory nearby. They @@ -140,7 +140,7 @@ # From Paul Eggert (2003-09-27): # Summer Time was first seriously proposed by William Willett (1857-1915), # a London builder and member of the Royal Astronomical Society -# who circulated a pamphlet ``The Waste of Daylight'' (1907) +# who circulated a pamphlet "The Waste of Daylight" (1907) # that proposed advancing clocks 20 minutes on each of four Sundays in April, # and retarding them by the same amount on four Sundays in September. # A bill was drafted in 1909 and introduced in Parliament several times, @@ -165,10 +165,10 @@ # </a> # From Paul Eggert (1996-09-03): -# The OED Supplement says that the English originally said ``Daylight Saving'' +# The OED Supplement says that the English originally said "Daylight Saving" # when they were debating the adoption of DST in 1908; but by 1916 this # term appears only in quotes taken from DST's opponents, whereas the -# proponents (who eventually won the argument) are quoted as using ``Summer''. +# proponents (who eventually won the argument) are quoted as using "Summer". # From Arthur David Olson (1989-01-19): # @@ -208,9 +208,9 @@ # which could not be said to run counter to any official description. # From Paul Eggert (2000-10-02): -# Howse writes (p 157) `DBST' too, but `BDST' seems to have been common +# Howse writes (p 157) 'DBST' too, but 'BDST' seems to have been common # and follows the more usual convention of putting the location name first, -# so we use `BDST'. +# so we use 'BDST'. # Peter Ilieve (1998-04-19) described at length # the history of summer time legislation in the United Kingdom. @@ -431,6 +431,8 @@ Rule GB-Eire 1981 1989 - Oct Sun>=23 1:00u 0 GMT Rule GB-Eire 1990 1995 - Oct Sun>=22 1:00u 0 GMT # Summer Time Order 1997 (S.I. 1997/2982) # See EU for rules starting in 1996. +# +# Use Europe/London for Jersey, Guernsey, and the Isle of Man. # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/London -0:01:15 - LMT 1847 Dec 1 0:00s @@ -438,9 +440,6 @@ Zone Europe/London -0:01:15 - LMT 1847 Dec 1 0:00s 1:00 - BST 1971 Oct 31 2:00u 0:00 GB-Eire %s 1996 0:00 EU GMT/BST -Link Europe/London Europe/Jersey -Link Europe/London Europe/Guernsey -Link Europe/London Europe/Isle_of_Man Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2 -0:25:21 - DMT 1916 May 21 2:00 -0:25:21 1:00 IST 1916 Oct 1 2:00s @@ -797,7 +796,7 @@ Zone Europe/Brussels 0:17:30 - LMT 1880 1:00 EU CE%sT # Bosnia and Herzegovina -# see Serbia +# See Europe/Belgrade. # Bulgaria # @@ -825,10 +824,10 @@ Zone Europe/Sofia 1:33:16 - LMT 1880 2:00 EU EE%sT # Croatia -# see Serbia +# See Europe/Belgrade. # Cyprus -# Please see the `asia' file for Asia/Nicosia. +# Please see the 'asia' file for Asia/Nicosia. # Czech Republic # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -845,6 +844,7 @@ Zone Europe/Prague 0:57:44 - LMT 1850 1:00 C-Eur CE%sT 1944 Sep 17 2:00s 1:00 Czech CE%sT 1979 1:00 EU CE%sT +# Use Europe/Prague also for Slovakia. # Denmark, Faroe Islands, and Greenland @@ -1008,12 +1008,12 @@ Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik air base # From Peter Ilieve (1996-10-28): # [IATA SSIM (1992/1996) claims that the Baltic republics switch at 01:00s, # but a relative confirms that Estonia still switches at 02:00s, writing:] -# ``I do not [know] exactly but there are some little different +# "I do not [know] exactly but there are some little different # (confusing) rules for International Air and Railway Transport Schedules # conversion in Sunday connected with end of summer time in Estonia.... # A discussion is running about the summer time efficiency and effect on # human physiology. It seems that Estonia maybe will not change to -# summer time next spring.'' +# summer time next spring." # From Peter Ilieve (1998-11-04), heavily edited: # <a href="http://trip.rk.ee/cgi-bin/thw?${BASE}=akt&${OOHTML}=rtd&TA=1998&TO=1&AN=1390"> @@ -1068,7 +1068,7 @@ Zone Europe/Tallinn 1:39:00 - LMT 1880 # Well, here in Helsinki we're just changing from summer time to regular one, # and it's supposed to change at 4am... -# From Janne Snabb (2010-0715): +# From Janne Snabb (2010-07-15): # # I noticed that the Finland data is not accurate for years 1981 and 1982. # During these two first trial years the DST adjustment was made one hour @@ -1105,9 +1105,7 @@ Zone Europe/Helsinki 1:39:52 - LMT 1878 May 31 1:39:52 - HMT 1921 May # Helsinki Mean Time 2:00 Finland EE%sT 1983 2:00 EU EE%sT - -# Aaland Is -Link Europe/Helsinki Europe/Mariehamn +# Use Europe/Helsinki for the Aaland Islands. # France @@ -1125,7 +1123,7 @@ Link Europe/Helsinki Europe/Mariehamn # -# Shank & Pottenger seem to use `24:00' ambiguously; resolve it with Whitman. +# Shank & Pottenger seem to use '24:00' ambiguously; resolve it with Whitman. # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S Rule France 1916 only - Jun 14 23:00s 1:00 S Rule France 1916 1919 - Oct Sun>=1 23:00s 0 - @@ -1257,10 +1255,7 @@ Zone Europe/Berlin 0:53:28 - LMT 1893 Apr # Source for the time in Busingen 1980: # http://www.srf.ch/player/video?id=c012c029-03b7-4c2b-9164-aa5902cd58d3 -# From Arthur David Olson (2012-03-03): -# Busingen and Zurich have shared clocks since 1970. - -Link Europe/Zurich Europe/Busingen +# Use Europe/Zurich for Busingen. # Georgia # Please see the "asia" file for Asia/Tbilisi. @@ -1415,7 +1410,7 @@ Zone Atlantic/Reykjavik -1:27:24 - LMT 1837 # <a href="http://toi.iriti.cnr.it/uk/ienitlt.html"> # Day-light Saving Time in Italy (2006-02-03) # </a> -# (`FP' below), taken from an Italian National Electrotechnical Institute +# ('FP' below), taken from an Italian National Electrotechnical Institute # publication. When the three sources disagree, guess who's right, as follows: # # year FP Shanks&P. (S) Whitman (W) Go with: @@ -1479,9 +1474,7 @@ Zone Europe/Rome 0:49:56 - LMT 1866 Sep 22 1:00 C-Eur CE%sT 1944 Jul 1:00 Italy CE%sT 1980 1:00 EU CE%sT - -Link Europe/Rome Europe/Vatican -Link Europe/Rome Europe/San_Marino +# Use Europe/Rome also for San Marino and Vatican City. # Latvia @@ -1652,7 +1645,7 @@ Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun 1:00 EU CE%sT # Macedonia -# see Serbia +# See Europe/Belgrade. # Malta # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -1745,7 +1738,7 @@ Zone Europe/Monaco 0:29:32 - LMT 1891 Mar 15 1:00 EU CE%sT # Montenegro -# see Serbia +# See Europe/Belgrade. # Netherlands @@ -1860,7 +1853,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1 # before 1895, and therefore probably changed the local time somewhere # between 1895 and 1925 (inclusive). -# From Paul Eggert (2001-05-01): +# From Paul Eggert (2013-08-09): # # Actually, Jan Mayen was never occupied by Germany during World War II, # so it must have diverged from Oslo time during the war, as Oslo was @@ -1884,10 +1877,8 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1 # the German armed forces at the Svalbard weather station code-named # Haudegen did not surrender to the Allies until September 1945. # -# All these events predate our cutoff date of 1970. Unless we can -# come up with more definitive info about the timekeeping during the -# war years it's probably best just do...the following for now: -Link Europe/Oslo Arctic/Longyearbyen +# All these events predate our cutoff date of 1970, so use Europe/Oslo +# for these regions. # Poland # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -2144,7 +2135,7 @@ Zone Europe/Bucharest 1:44:24 - LMT 1891 Oct # so we (Novosibirsk) simply did not switch. # # From Andrey A. Chernov (1996-10-04): -# `MSK' and `MSD' were born and used initially on Moscow computers with +# 'MSK' and 'MSD' were born and used initially on Moscow computers with # UNIX-like OSes by several developer groups (e.g. Demos group, Kiae group).... # The next step was the UUCP network, the Relcom predecessor # (used mainly for mail), and MSK/MSD was actively used there. @@ -2443,6 +2434,9 @@ Zone Asia/Anadyr 11:49:56 - LMT 1924 May 2 11:00 Russia ANA%sT 2011 Mar 27 2:00s 12:00 - ANAT +# San Marino +# See Europe/Rome. + # Serbia # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone Europe/Belgrade 1:22:00 - LMT 1884 @@ -2455,17 +2449,14 @@ Zone Europe/Belgrade 1:22:00 - LMT 1884 # Shanks & Pottenger don't give as much detail, so go with Kozelj. 1:00 - CET 1982 Nov 27 1:00 EU CE%sT -Link Europe/Belgrade Europe/Ljubljana # Slovenia -Link Europe/Belgrade Europe/Podgorica # Montenegro -Link Europe/Belgrade Europe/Sarajevo # Bosnia and Herzegovina -Link Europe/Belgrade Europe/Skopje # Macedonia -Link Europe/Belgrade Europe/Zagreb # Croatia +# Use Europe/Belgrade also for Bosnia and Herzegovina, Croatia, Macedonia, +# Montenegro, and Slovenia. # Slovakia -Link Europe/Prague Europe/Bratislava +# See Europe/Prague. # Slovenia -# see Serbia +# See Europe/Belgrade. # Spain # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S @@ -2599,7 +2590,7 @@ Zone Europe/Stockholm 1:12:12 - LMT 1879 Jan 1 # and their performance improved enormously. Communities began to keep # mean time in preference to apparent time -- Geneva from 1780 .... # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S -# From Whitman (who writes ``Midnight?''): +# From Whitman (who writes "Midnight?"): # Rule Swiss 1940 only - Nov 2 0:00 1:00 S # Rule Swiss 1940 only - Dec 31 0:00 0 - # From Shanks & Pottenger: @@ -2884,7 +2875,7 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880 # From Paul Eggert (2006-03-22): # The _Economist_ (1994-05-28, p 45) reports that central Crimea switched # from Kiev to Moscow time sometime after the January 1994 elections. -# Shanks (1999) says ``date of change uncertain'', but implies that it happened +# Shanks (1999) says "date of change uncertain", but implies that it happened # sometime between the 1994 DST switches. Shanks & Pottenger simply say # 1994-09-25 03:00, but that can't be right. For now, guess it # changed in May. @@ -2898,6 +2889,9 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880 3:00 - MSK 1997 Mar lastSun 1:00u 2:00 EU EE%sT +# Vatican City +# See Europe/Rome. + ############################################################################### # One source shows that Bulgaria, Cyprus, Finland, and Greece observe DST from diff --git a/northamerica b/northamerica index 1964903..13278d2 100644 --- a/northamerica +++ b/northamerica @@ -2928,10 +2928,7 @@ Zone America/Grenada -4:07:00 - LMT 1911 Jul # St George's # Zone NAME GMTOFF RULES FORMAT [UNTIL] Zone America/Guadeloupe -4:06:08 - LMT 1911 Jun 8 # Pointe a Pitre -4:00 - AST -# St Barthelemy -Link America/Guadeloupe America/St_Barthelemy -# St Martin (French part) -Link America/Guadeloupe America/Marigot +# Use America/Guadeloupe also for St Barthelemy and for St Martin (French part). # Guatemala # diff --git a/southamerica b/southamerica index 0d8ed7a..70995e6 100644 --- a/southamerica +++ b/southamerica @@ -1349,13 +1349,9 @@ Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad -4:30 - ANT 1965 # Netherlands Antilles Time -4:00 - AST -# From Arthur David Olson (2011-06-15): -# At least for now, use links for places with new iso3166 codes. -# The name "Lower Prince's Quarter" is both longer than fourteen charaters -# and contains an apostrophe; use "Lower_Princes" below. - -Link America/Curacao America/Lower_Princes # Sint Maarten -Link America/Curacao America/Kralendijk # Bonaire, Sint Estatius and Saba +# Sint Marten +# Bonaire, Sint Estatius and Saba +# Use America/Curacao. # Ecuador # diff --git a/zone.tab b/zone.tab index 3ec24a7..a6146f7 100644 --- a/zone.tab +++ b/zone.tab @@ -5,25 +5,31 @@ # # From Paul Eggert (2013-05-27): # -# This file contains a table with the following columns: -# 1. ISO 3166 2-character country code. See the file `iso3166.tab'. -# This identifies a country that overlaps the zone. The country may -# overlap other zones and the zone may overlap other countries. -# 2. Latitude and longitude of the zone's principal location +# This file contains a table where each row stands for an area that is +# the intersection of a country and a zone. In a zone, civil clocks +# have agreed since 1970. The columns of the table are as follows: +# +# 1. ISO 3166 2-character country code. See the file 'iso3166.tab'. +# 2. Latitude and longitude of the area's principal location # in ISO 6709 sign-degrees-minutes-seconds format, # either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS, # first latitude (+ is north), then longitude (+ is east). -# This location need not lie within the column-1 country. +# Often this is the location named in column 3, but there +# are exceptions for zones that cross country boundaries. # 3. Zone name used in value of TZ environment variable. # Please see the 'Theory' file for how zone names are chosen. +# If multiple zones overlap a country, each has a row in the +# table, with column 1 being duplicated. Conversely, if multiple +# countries overlap a zone, each has a row in the table, with +# column 3 being duplicated. # 4. Comments; present if and only if the country has multiple rows. # # Columns are separated by a single tab. # The table is sorted first by country, then an order within the country that # (1) makes some geographical sense, and -# (2) puts the most populous zones first, where that does not contradict (1). +# (2) puts the most populous areas first, where that does not contradict (1). # -# Lines beginning with `#' are comments. +# Lines beginning with '#' are comments. # # This table is intended as an aid for users, to help them select time # zone data appropriate for their practical needs. It is not intended @@ -77,9 +83,9 @@ AU -1228+13050 Australia/Darwin Northern Territory AU -3157+11551 Australia/Perth Western Australia - most locations AU -3143+12852 Australia/Eucla Western Australia - Eucla area AW +1230-06958 America/Aruba -AX +6006+01957 Europe/Mariehamn +AX +6006+01957 Europe/Helsinki AZ +4023+04951 Asia/Baku -BA +4352+01825 Europe/Sarajevo +BA +4352+01825 Europe/Belgrade BB +1306-05937 America/Barbados BD +2343+09025 Asia/Dhaka BE +5050+00420 Europe/Brussels @@ -88,11 +94,11 @@ BG +4241+02319 Europe/Sofia BH +2623+05035 Asia/Bahrain BI -0323+02922 Africa/Bujumbura BJ +0629+00237 Africa/Porto-Novo -BL +1753-06251 America/St_Barthelemy +BL +1753-06251 America/Guadeloupe BM +3217-06446 Atlantic/Bermuda BN +0456+11455 Asia/Brunei BO -1630-06809 America/La_Paz -BQ +120903-0681636 America/Kralendijk +BQ +120903-0681636 America/Curacao BR -0351-03225 America/Noronha Atlantic islands BR -0127-04829 America/Belem Amapa, E Para BR -0343-03830 America/Fortaleza NE Brazil (MA, PI, CE, RN, PB) @@ -167,7 +173,7 @@ CX -1025+10543 Indian/Christmas CY +3510+03322 Asia/Nicosia CZ +5005+01426 Europe/Prague DE +5230+01322 Europe/Berlin most locations -DE +4742+00841 Europe/Busingen Busingen +DE +4742+00841 Europe/Zurich Busingen DJ +1136+04309 Africa/Djibouti DK +5540+01235 Europe/Copenhagen DM +1518-06124 America/Dominica @@ -196,7 +202,7 @@ GB +513030-0000731 Europe/London GD +1203-06145 America/Grenada GE +4143+04449 Asia/Tbilisi GF +0456-05220 America/Cayenne -GG +4927-00232 Europe/Guernsey +GG +4927-00232 Europe/London GH +0533-00013 Africa/Accra GI +3608-00521 Europe/Gibraltar GL +6411-05144 America/Godthab most locations @@ -215,7 +221,7 @@ GW +1151-01535 Africa/Bissau GY +0648-05810 America/Guyana HK +2217+11409 Asia/Hong_Kong HN +1406-08713 America/Tegucigalpa -HR +4548+01558 Europe/Zagreb +HR +4548+01558 Europe/Belgrade HT +1832-07220 America/Port-au-Prince HU +4730+01905 Europe/Budapest ID -0610+10648 Asia/Jakarta Java & Sumatra @@ -224,14 +230,14 @@ ID -0507+11924 Asia/Makassar east & south Borneo, Sulawesi (Celebes), Bali, Nusa ID -0232+14042 Asia/Jayapura west New Guinea (Irian Jaya) & Malukus (Moluccas) IE +5320-00615 Europe/Dublin IL +314650+0351326 Asia/Jerusalem -IM +5409-00428 Europe/Isle_of_Man +IM +5409-00428 Europe/London IN +2232+08822 Asia/Kolkata IO -0720+07225 Indian/Chagos IQ +3321+04425 Asia/Baghdad IR +3540+05126 Asia/Tehran IS +6409-02151 Atlantic/Reykjavik IT +4154+01229 Europe/Rome -JE +4912-00207 Europe/Jersey +JE +4912-00207 Europe/London JM +1800-07648 America/Jamaica JO +3157+03556 Asia/Amman JP +353916+1394441 Asia/Tokyo @@ -266,12 +272,12 @@ LY +3254+01311 Africa/Tripoli MA +3339-00735 Africa/Casablanca MC +4342+00723 Europe/Monaco MD +4700+02850 Europe/Chisinau -ME +4226+01916 Europe/Podgorica -MF +1804-06305 America/Marigot +ME +4226+01916 Europe/Belgrade +MF +1804-06305 America/Guadeloupe MG -1855+04731 Indian/Antananarivo MH +0709+17112 Pacific/Majuro most locations MH +0905+16720 Pacific/Kwajalein Kwajalein -MK +4159+02126 Europe/Skopje +MK +4159+02126 Europe/Belgrade ML +1239-00800 Africa/Bamako MM +1647+09610 Asia/Rangoon MN +4755+10653 Asia/Ulaanbaatar most locations @@ -364,18 +370,18 @@ SD +1536+03232 Africa/Khartoum SE +5920+01803 Europe/Stockholm SG +0117+10351 Asia/Singapore SH -1555-00542 Atlantic/St_Helena -SI +4603+01431 Europe/Ljubljana -SJ +7800+01600 Arctic/Longyearbyen -SK +4809+01707 Europe/Bratislava +SI +4603+01431 Europe/Belgrade +SJ +7800+01600 Europe/Oslo +SK +4809+01707 Europe/Prague SL +0830-01315 Africa/Freetown -SM +4355+01228 Europe/San_Marino +SM +4355+01228 Europe/Rome SN +1440-01726 Africa/Dakar SO +0204+04522 Africa/Mogadishu SR +0550-05510 America/Paramaribo SS +0451+03136 Africa/Juba ST +0020+00644 Africa/Sao_Tome SV +1342-08912 America/El_Salvador -SX +180305-0630250 America/Lower_Princes +SX +180305-0630250 America/Curacao SY +3330+03618 Asia/Damascus SZ -2618+03106 Africa/Mbabane TC +2128-07108 America/Grand_Turk @@ -435,7 +441,7 @@ US +211825-1575130 Pacific/Honolulu Hawaii UY -3453-05611 America/Montevideo UZ +3940+06648 Asia/Samarkand west Uzbekistan UZ +4120+06918 Asia/Tashkent east Uzbekistan -VA +415408+0122711 Europe/Vatican +VA +415408+0122711 Europe/Rome VC +1309-06114 America/St_Vincent VE +1030-06656 America/Caracas VG +1827-06437 America/Tortola -- 1.8.1.2
On 9 August 2013 11:14, Paul Eggert <eggert@cs.ucla.edu> wrote:
diff --git a/southamerica b/southamerica index 0d8ed7a..70995e6 100644 --- a/southamerica +++ b/southamerica @@ -1349,13 +1349,9 @@ Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad -4:30 - ANT 1965 # Netherlands Antilles Time -4:00 - AST
-# From Arthur David Olson (2011-06-15): -# At least for now, use links for places with new iso3166 codes. -# The name "Lower Prince's Quarter" is both longer than fourteen charaters -# and contains an apostrophe; use "Lower_Princes" below. - -Link America/Curacao America/Lower_Princes # Sint Maarten -Link America/Curacao America/Kralendijk # Bonaire, Sint Estatius and Saba +# Sint Marten +# Bonaire, Sint Estatius and Saba +# Use America/Curacao.
# Ecuador #
An 'a' seems to have gone missing in this patch: "Sint Maarten" turned into "Sint Marten". Cheers, Philip -- Philip Newton <philip.newton@gmail.com>
On 08/09/2013 02:40 AM, Philip Newton wrote:
An 'a' seems to have gone missing in this patch: "Sint Maarten" turned into "Sint Marten".
Thanks, I pushed this patch:
From 1eef2f6735d3f48db798e42ed832f0839d737d41 Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Fri, 9 Aug 2013 09:51:29 -0700 Subject: [PATCH] * southamerica: Fix misspelling of "Sint Maarten" in comment.
Reported by Philip Newton in <http://mm.icann.org/pipermail/tz/2013-August/019512.html>. --- southamerica | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/southamerica b/southamerica index 70995e6..17150a8 100644 --- a/southamerica +++ b/southamerica @@ -1349,7 +1349,7 @@ Zone America/Curacao -4:35:47 - LMT 1912 Feb 12 # Willemstad -4:30 - ANT 1965 # Netherlands Antilles Time -4:00 - AST -# Sint Marten +# Sint Maarten # Bonaire, Sint Estatius and Saba # Use America/Curacao. -- 1.8.1.2
For some reason I did not receive [Patch 3/4]. Was it sent out? Also I would like, at least temporarily, to raise a yellow flag on patch 4/4. Numerous products allow their users to use the current tz identifiers and links directly and I need a short time to study the consequences of the change proposed for currently installed users. A case in point is Drupal, one of the top CMS systems in installed base (after Wordpress), which allows all users to select their own timezone identifier. There are currently about 1 million Drupal websites installed, many of which have hundreds or thousands of users.
On Fri, 9 Aug 2013, David Patte ₯ wrote:
For some reason I did not receive [Patch 3/4]. Was it sent out?
Also I would like, at least temporarily, to raise a yellow flag on patch 4/4.
Numerous products allow their users to use the current tz identifiers and links directly and I need a short time to study the consequences of the change proposed for currently installed users. A case in point is Drupal, one of the top CMS systems in installed base (after Wordpress), which allows all users to select their own timezone identifier. There are currently about 1 million Drupal websites installed, many of which have hundreds or thousands of users.
As author of PHP's Date/Time support I can tell you the bundled library will contain *all* TZIDs, whether they are in backwards/links or not. However, I do agree with your concerns over things like this: -HR +4548+01558 Europe/Zagreb +HR +4548+01558 Europe/Belgrade I think this will give a *lot* of public outcry, with the other changes in the Balkans causing even more issues as suddenly people listing the zones for "HR" (Croatia) now will see the name of a Serbian city. This is *not* okay. cheers, Derick
On 08/09/2013 05:41 AM, David Patte ₯ wrote:
For some reason I did not receive [Patch 3/4]. Was it sent out?
Yes. You can get a copy from the archives, here: http://mm.icann.org/pipermail/tz/2013-August/019510.html
Numerous products allow their users to use the current tz identifiers and links directly
That shouldn't be a problem; all the links are still there. They're just in 'backward', not in 'europe' or whatever. On 08/09/2013 06:44 AM, Derick Rethans wrote:
people listing the zones for "HR" (Croatia) now will see the name of a Serbian city.
These zone.tab entries are present only as a convenience for users who run programs like 'tzselect'. I hope this doesn't turn into a political football, but if it does we can simply remove any controversial zone.tab entries. That would simplify our maintenance and avoid politics even further, though it'd make 'tzselect' a bit harder to use in the affected locations.
On Fri, 9 Aug 2013, Paul Eggert wrote:
On 08/09/2013 06:44 AM, Derick Rethans wrote:
people listing the zones for "HR" (Croatia) now will see the name of a Serbian city.
These zone.tab entries are present only as a convenience for users who run programs like 'tzselect'.
Maybe that was the original idea, but that does not mean that people don't use it differently from the original intented usage. I've always admired the way David ran this to keep this project stable with as little changes as he could get away with. It frustrates me that this is now no longer the case. I don't understand why the changes to zone.tab have to be made. I realize Zagreb/Belgrade are *right now* following the same rules, but that does not necessarily have to be the case in the future. Leaving: HR +4548+01558 Europe/Zagreb in zone.tab doesn't hurt anything at all.
I hope this doesn't turn into a political football, but if it does we can simply remove any controversial zone.tab entries.
The better solution is just to *not change it* in the first place! cheers, Derick
Derick Rethans wrote:
Maybe that was the original idea, but that does not mean that people don't use it differently from the original intented usage.
Which usages are these, in practice? Nobody has mentioned any significant problems yet.
I don't understand why the changes to zone.tab have to be made.
The problem is politics. We are trying to get the tz project out of the political issues of what the boundary between Country X and Country Y is, or whether Country X is actually a country. When I created zone.tab originally, I was naive about how bad this could be, and I'm trying to change things slightly to avoid as many future political problems as I can without breaking things significantly. There is no perfect solution here -- no matter what we do, even if it's doing nothing right now, there will be more work to do later; but the political hassles are real, and will consume more and more of our resources as time goes on, and I'm trying to head as many of them off at the pass now as feasible.
(Android currently uses zone.tab to get a list of time zones in use in a given country.) On Tue, Aug 13, 2013 at 8:17 AM, Paul Eggert <eggert@cs.ucla.edu> wrote:
Derick Rethans wrote:
Maybe that was the original idea, but that does not mean that people don't use it differently from the original intented usage.
Which usages are these, in practice? Nobody has mentioned any significant problems yet.
I don't understand why the changes to zone.tab have to be made.
The problem is politics. We are trying to get the tz project out of the political issues of what the boundary between Country X and Country Y is, or whether Country X is actually a country. When I created zone.tab originally, I was naive about how bad this could be, and I'm trying to change things slightly to avoid as many future political problems as I can without breaking things significantly. There is no perfect solution here -- no matter what we do, even if it's doing nothing right now, there will be more work to do later; but the political hassles are real, and will consume more and more of our resources as time goes on, and I'm trying to head as many of them off at the pass now as feasible.
-- Elliott Hughes - http://who/enh - http://jessies.org/~enh/ Java i18n/JNI/NIO, or bionic questions? Mail me/drop by/add me as a reviewer.
On Tue, Aug 13, 2013 at 08:17:58AM -0700, Paul Eggert <eggert@cs.ucla.edu> wrote:
I don't understand why the changes to zone.tab have to be made.
The problem is politics. We are trying to get the tz project out of the political issues of what the boundary between Country X and
While this is understandable (do what you have to do to keep it alive...), I think the fundamental issue here is that reducing the quality of the tz distribution(s) (which were beyond outstanding) for political reasons is very much not what many people think is, or was, the spirit of the previous maintainership. One could (and does :) argue that this is necessary to be able to maintain it ("giving in to the trolls"), or that the reduction in quality is negligent, but the fact remains that the stability is sacrificed for political reasons. And this is, in my book, indeed a big change in maintainership. Personally, I do wonder what other changes will be introduced in the future, given that political pressure is now able to override technical decisions. I wonder if this doesn't set a precedent for future lobbying groups. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\
enh wrote:
Android currently uses zone.tab to get a list of time zones in use in a given country.
Yes, as does tzselect (which is in the tz code). This continues to work with the proposed changes: zone.tab still lists all time zones in use in a given country, and every entry in that list continues to work. Marc Lehmann wrote:
reducing the quality of the tz distribution(s) (which were beyond outstanding) for political reasons
No real reduction in quality is being proposed. There's no significant difference in behavior between the current and proposed data. David Patte wrote:
Using the political consensus of the UN is the standard way of handling such issues.
As we've discovered, that doesn't suffice to prevent major disagreements on this list, disagreements on issues that are not germane to the primary purpose of the tz database. If we froze zone.tab these disagreements would continue to take time and energy away from the project. The goal of the recently proposed changes is to avoid these political minefields in the future, without introducing significant technical problems. So far, no significant technical problems have been been uncovered, though of course that may change as the issue is discussed further.
On Tue, Aug 13, 2013 at 5:32 PM, Paul Eggert <eggert@cs.ucla.edu> wrote:
No real reduction in quality is being proposed. There's no significant difference in behavior between the current and proposed data.
Making a change such as: -HR +4548+01558 Europe/Zagreb +HR +4548+01558 Europe/Belgrade is a drastic difference in behavior for end users, even if it does not affect the actual time displayed on the screen. To the *end user* this is both a "reduction in quality" and "significant difference", to use your words, as this string will appear on their screen in fairly common software applications. Whether we like it or not, these strings are used in UX around the world. Strings with words were chosen as identifiers instead of integers, hex numbers, or some other computable form because they're easy for a human to grok, remember, and reference. Words, of course, can be associated with feelings. Striving for technical purity doesn't obviate the need for common sense. Common sense dictated that the zones be broken up so that each country had an identifier in zone.tab to avoid confusion (or other feelings). Common sense dictates they should remain that way. It is hard to specify and codify common sense, which is why there is a place to have (hopefully) civilized discourse. Personally, I do not feel that zone identifier modifications occur frequently enough to eschew this common sense. Others may disagree, so I'd like to see opinions on the list from anyone else who *favors* the change made above and all others in the proposed patch. -Andrew
On 2013-08-13 17:32, Paul Eggert wrote:
David Patte wrote:
Using the political consensus of the UN is the standard way of handling such issues. As we've discovered, that doesn't suffice to prevent major disagreements on this list,
The only reason there is any current debate is a direct consequence of the maintainers refusing to differ the politics to a third party. Had tz accepted UN standards, as had been proposed 4 months ago, this whole discussion could have been avoided. When talking about people and populations, there will always be a political side. The haggling should be done where it is appropriate, at the UN, not on the tz mailing list. --
On Aug 13, 2013, at 7:23 PM, David Patte ₯ <dpatte@relativedata.com> wrote:
On 2013-08-13 17:32, Paul Eggert wrote:
David Patte wrote:
Using the political consensus of the UN is the standard way of handling such issues. As we've discovered, that doesn't suffice to prevent major disagreements on this list,
The only reason there is any current debate is a direct consequence of the maintainers refusing to differ the politics to a third party. Had tz accepted UN standards, as had been proposed 4 months ago, this whole discussion could have been avoided.
Nonsense. It would only impose some other group's political biases on the process. Please stop flogging that dead horse. paul
On Tue, Aug 13, 2013, at 17:32, Paul Eggert wrote:
enh wrote:
Android currently uses zone.tab to get a list of time zones in use in a given country.
Yes, as does tzselect (which is in the tz code). This continues to work with the proposed changes: zone.tab still lists all time zones in use in a given country, and every entry in that list continues to work.
The problem is, most tools that use it list city names, and that is not likely to change.
Marc Lehmann wrote:
reducing the quality of the tz distribution(s) (which were beyond outstanding) for political reasons
No real reduction in quality is being proposed. There's no significant difference in behavior between the current and proposed data.
---- What happened here is _you_ made a blunder in 1995, by rigidly applying the "most populated city" rule [ignoring the principle of leaving small violations like a hypothetical Rome vs Milan alone] to a city you believed was the most populated one in the region while ignorant of the dispute as to whether, in fact, it is in the region. This went unnoticed for a while, and when it was pointed out, you covered for it by trying to turn "politics" into a massive bogeyman rather than going for the simple non-disruptive solution of causing the database to once again not comment on the status of Jerusalem. The idea that no reduction in quality is being proposed is ridiculous. The reality of the fact that country codes and city names are listed alongside each other by the vast majority of tools that use zone.tab should not be ignored. And politics is not a significant enough issue often enough to justify completely destroying the "Each region is only in one country" rule rather than simply avoiding naming them after cities in disputed border regions.
Shouldn't the standard be correct time? If politics can assert influence to the point where it breaks the code, then I think bowing to political pressure should be avoided. Politicians do all sorts of stupid things. A friend of mine who was a chemical engineer once told me about the foolishness of an EPA lawyer who once said that a pH of 7.0 wasn't low enough saying... "If you can get it down to 7, why can't you get it down to zero?". On Wed, Aug 14, 2013 at 12:04 AM, <random832@fastmail.us> wrote:
On Tue, Aug 13, 2013, at 17:32, Paul Eggert wrote:
enh wrote:
Android currently uses zone.tab to get a list of time zones in use in a given country.
Yes, as does tzselect (which is in the tz code). This continues to work with the proposed changes: zone.tab still lists all time zones in use in a given country, and every entry in that list continues to work.
The problem is, most tools that use it list city names, and that is not likely to change.
Marc Lehmann wrote:
reducing the quality of the tz distribution(s) (which were beyond outstanding) for political reasons
No real reduction in quality is being proposed. There's no significant difference in behavior between the current and proposed data.
----
What happened here is _you_ made a blunder in 1995, by rigidly applying the "most populated city" rule [ignoring the principle of leaving small violations like a hypothetical Rome vs Milan alone] to a city you believed was the most populated one in the region while ignorant of the dispute as to whether, in fact, it is in the region.
This went unnoticed for a while, and when it was pointed out, you covered for it by trying to turn "politics" into a massive bogeyman rather than going for the simple non-disruptive solution of causing the database to once again not comment on the status of Jerusalem.
The idea that no reduction in quality is being proposed is ridiculous. The reality of the fact that country codes and city names are listed alongside each other by the vast majority of tools that use zone.tab should not be ignored. And politics is not a significant enough issue often enough to justify completely destroying the "Each region is only in one country" rule rather than simply avoiding naming them after cities in disputed border regions.
On 2013-08-13 22:32, Paul Eggert wrote:
enh wrote:
Android currently uses zone.tab to get a list of time zones in use in a given country.
Yes, as does tzselect (which is in the tz code). This continues to work with the proposed changes: zone.tab still lists all time zones in use in a given country, and every entry in that list continues to work.
I guess most "user friendly" distros wouldn't use tzselect anyway, and those that rely on zone.tab are free to patch it for political reasons if they so desire. -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
On Tue, Aug 13, 2013 at 02:32:58PM -0700, Paul Eggert <eggert@cs.ucla.edu> wrote:
reducing the quality of the tz distribution(s) (which were beyond outstanding) for political reasons
No real reduction in quality is being proposed.
What is "real" and what not is very subjective - introducing changes in the database for non-technical reasons increases the risk of errors, increases the amount of work due to unnecessary changes and so on. Sure, the reduction is probably offset by giving you (and the list) more freedom in doing other, more important work, so it is probably net positive (and you are doing a great job), but it does set a precedent, something unheard of in earlier times, when the tz database was purely concerned for technical merits, rather than political correctness.
There's no significant difference in behavior between the current and proposed data.
"significant" is also subjective. If it breaks something, somewhere, it was signifcant in that case, and you can't just dismiss it by saying it isn't signifant. Change for the sake of change, even if it seems significant, often isn't. -- The choice of a Deliantra, the free code+content MORPG -----==- _GNU_ http://www.deliantra.net ----==-- _ generation ---==---(_)__ __ ____ __ Marc Lehmann --==---/ / _ \/ // /\ \/ / schmorp@schmorp.de -=====/_/_//_/\_,_/ /_/\_\
@@ -215,7 +221,7 @@ GW +1151-01535 Africa/Bissau GY +0648-05810 America/Guyana HK +2217+11409 Asia/Hong_Kong HN +1406-08713 America/Tegucigalpa -HR +4548+01558 Europe/Zagreb +HR +4548+01558 Europe/Belgrade HT +1832-07220 America/Port-au-Prince HU +4730+01905 Europe/Budapest ID -0610+10648 Asia/Jakarta Java & Sumatra Note this war, if i recall correctly, saw mass murder and enslavement of women (for shared sexual abuse). Europe (and especially its largest and most wealthy country) as well as the U.S. did not play any good role at all, and in time. If that is the future i personally would be in favour of dropping this file (or at least columns >2), leaving the task of filling the missing data up to projects which belong to companies like Google and Microsoft (CLDR, that is). I wonder a bit, after having read anti al-Gaddafi and pro-war statements on Stallmans web site some time ago (first and last time i went there; surely not written by himself, however). --steffen
On Wed, 14 Aug 2013, Steffen Daode Nurpmeso wrote:
@@ -215,7 +221,7 @@ GW +1151-01535 Africa/Bissau GY +0648-05810 America/Guyana HK +2217+11409 Asia/Hong_Kong HN +1406-08713 America/Tegucigalpa -HR +4548+01558 Europe/Zagreb +HR +4548+01558 Europe/Belgrade HT +1832-07220 America/Port-au-Prince HU +4730+01905 Europe/Budapest ID -0610+10648 Asia/Jakarta Java & Sumatra
Note this war, if i recall correctly, saw mass murder and enslavement of women (for shared sexual abuse). Europe (and especially its largest and most wealthy country) as well as the U.S. did not play any good role at all, and in time.
If that is the future i personally would be in favour of dropping this file (or at least columns >2),
No, the logical response would be to *not* apply this patch in the first place. Data stability++. cheers, Derick
On Tue, 13 Aug 2013, Paul Eggert wrote:
Derick Rethans wrote:
Maybe that was the original idea, but that does not mean that people don't use it differently from the original intented usage.
Which usages are these, in practice? Nobody has mentioned any significant problems yet.
I can think of three already, without doing any further research into this. 1. Debian's "dpkg-reconfigure tzdata". Their ssystem allows you to select by region the top-level of the zone names: ┌──────────┤ Configuring tzdata ├───────────┐ │ Please select the geographic area in │ │ which you live. Subsequent configuration │ │ questions will narrow this down by │ │ presenting a list of cities, │ │ representing the time zones in which │ │ they are located. │ │ │ │ Geographic area: │ │ │ │ Africa │ │ America │ │ Antarctica │ │ Australia │ │ Arctic Ocean │ │ Asia │ │ Atlantic Ocean │ │ Europe │ │ Indian Ocean │ │ Pacific Ocean │ │ System V timezones │ │ US │ │ None of the above │ And then further restrict this by city-name: │ Time zone: │ │ │ │ Karachi ↑ │ │ Kashgar ▒ │ │ Katmandu ▒ │ │ Khandyga ▒ │ It does some strange things with the names from the "backward" directory, as you can see, the outdated "Katmandu" is in the list where as Kathmandu, the new name is not. They have a few exception/inclusions hard coded in their source packages and this is likely to break. 2. Debian's/Raspian's "tzselect" lists for "Asia": Please select a country. 1) Afghanistan 18) Israel 35) Palestine ... 9) China 26) Laos 43) Taiwan For this they use both zone.tab and iso3166.tab. They probably should change "country" to "region" there though... 3. PHP's DateTime support allows you to specify to list only a certain amount of timezone identifiers: $ids = DateTimeZone::listIdentifiers( DateTimeZone::EUROPE ); Or per country: $ids = DateTimeZone::listIdentifiers( DateTimeZone::PER_COUNTRY, "HR" ); var_dump( $ids ); Output: array(1) { [0] => string(13) "Europe/Zagreb" } For this it uses the zone.tab data file. With your proposed change, that will now show: array(1) { [0] => string(15) "Europe/Belgrade" } And I can assure you people will get upset by this. And all for no reason, as without the proposed changed *all works as it did*. I don't see why you are picking a political fight here, as there was no problem before.
I don't understand why the changes to zone.tab have to be made.
The problem is politics. We are trying to get the tz project out of the political issues of what the boundary between Country X and Country Y is, or whether Country X is actually a country.
Actually, I think you're making it worse by putting whole cities into different countries. You also need to realise that the ISO 3166-1 alpha-2 codes are *not* just for countries anyway. Wikipedia states: "represent countries, dependent territories, and special areas of geographical interest." — avoiding very nice the Taiwan/China and Israel/Palestine issue. Hence, I don't even see why we can't continue using those codes in the first place, as they're not reserved for countries in the first place.
When I created zone.tab originally, I was naive about how bad this could be, and I'm trying to change things slightly to avoid as many future political problems as I can without breaking things significantly. There is no perfect solution here -- no matter what we do, even if it's doing nothing right now, there will be more work to do later; but the political hassles are real, and will consume more and more of our resources as time goes on, and I'm trying to head as many of them off at the pass now as feasible.
Right, I agree there is no good solution, but there is a zone.tab file, and people are using it. And because there is no good solution, keeping the status quo, and thus keeping the database *stable*, is the only way to not make a new stance on anything. cheers, Derick
On 08/14/13 08:51, Derick Rethans wrote:
Nobody has mentioned any significant problems yet.
I can think of three already, without doing any further research into this.
1. Debian's "dpkg-reconfigure tzdata".
This isn't a problem, since dpkg-reconfigure operates by directly inspecting the tree of installed tz binary files, so it's unaffected by the proposed changes to zone.tab.
2. Debian's/Raspian's "tzselect" lists for "Asia":
Yes, that's the tz package's tzselect program. With the proposed changes the resulting TZ setting would work as before, the only difference being a political difference how the setting itself is spelled (whether the setting is spelled TZ='Europe/Zagreb' or TZ='Europe/Belgrade', say). This objection to this change is essentially political. Whether one considers the change to be a significant problem depends on whether one is trying to make the best technical change independent of politics (as I was) or is trying to defer to political considerations of users who look at internal TZ settings and might object to how they're spelled.
3. PHP's DateTime support
This is the same issue as the tzselect program.
And I can assure you people will get upset by this.
As I think we both agree, people will get upset no matter what, even if we do nothing; it's more a question of how do we lessen the amount of future ire and work for everybody. All this being said, it does seem that the recent proposed changes to zone.tab do not have consensus, so as described in <http://mm.icann.org/pipermail/tz/2013-August/019546.html> I've reverted them in the experimental github version. I'll try to think of a gentler way of insulating this project from future political issues.
You also need to realise that the ISO 3166-1 alpha-2 codes are *not* just for countries anyway. Wikipedia states: "represent countries, dependent territories, and special areas of geographical interest." —
Thanks, although that's not enough to insulate us from politics (it certainly wasn't last time ...), it can't hurt to mention this in zone.tab and in iso3166.tab, so I added that to the commentary while reverting the changes.
On Wed, Aug 14, 2013, at 15:31, Paul Eggert wrote:
All this being said, it does seem that the recent proposed changes to zone.tab do not have consensus, so as described in <http://mm.icann.org/pipermail/tz/2013-August/019546.html> I've reverted them in the experimental github version. I'll try to think of a gentler way of insulating this project from future political issues.
What about making an all-new set of timezone names that aren't named for cities, either - e.g. Europe/Central-A, Central-B, etc... and put _all_ the city-name zones in backward?
Paul Eggert wrote:
You also need to realise that the ISO 3166-1 alpha-2 codes are*not*
just for countries anyway. Wikipedia states: "represent countries, dependent territories, and special areas of geographical interest." — Thanks, although that's not enough to insulate us from politics (it certainly wasn't last time ...), it can't hurt to mention this in zone.tab and in iso3166.tab, so I added that to the commentary while reverting the changes.
And certainly London is not in the middle of the Irish Sea or off the coast of France ;) Actually having multiple results for 'Europe/London' was simply wrong even if 'currently' they are the same timezone. For personally reasons I use Europe/Isle_of_Man and would simply revert that if ever it goes away again. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
On Wed, 14 Aug 2013, Paul Eggert wrote:
On 08/14/13 08:51, Derick Rethans wrote:
2. Debian's/Raspian's "tzselect" lists for "Asia":
This objection to this change is essentially political. Whether one considers the change to be a significant problem depends on whether one is trying to make the best technical change independent of politics (as I was) or is trying to defer to political considerations of users who look at internal TZ settings and might object to how they're spelled.
I did some asking with a few Croatians, and they definitely found this problematic.
As I think we both agree, people will get upset no matter what, even if we do nothing; it's more a question of how do we lessen the amount of future ire and work for everybody.
Not using city names for tzids would work, but I guess that ship has sailed a few decades ago!
All this being said, it does seem that the recent proposed changes to zone.tab do not have consensus, so as described in <http://mm.icann.org/pipermail/tz/2013-August/019546.html> I've reverted them in the experimental github version. I'll try to think of a gentler way of insulating this project from future political issues.
Thanks - I appreciate that. In the meanwhile, have a look at this (pretty) map showing all the timezones: http://maps.derickrethans.nl/?l=timezones&lat=50&lon=20&zoom=3 (Built with Eric Muller's shapefiles from http://www.efele.net/maps/tz/world/) cheers, Derick
Derick Rethans wrote:
In the meanwhile, have a look at this (pretty) map showing all the timezones: http://maps.derickrethans.nl/?l=timezones&lat=50&lon=20&zoom=3 (Built with Eric Muller's shapefiles fromhttp://www.efele.net/maps/tz/world/)
Nice use of OSM ... Next step would be a nice link to data on a timezone ;) I've been looking into that for another couple of jobs, but it's well down the todo list. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
On Thu, 15 Aug 2013, Lester Caine wrote:
Derick Rethans wrote:
In the meanwhile, have a look at this (pretty) map showing all the timezones: http://maps.derickrethans.nl/?l=timezones&lat=50&lon=20&zoom=3 (Built with Eric Muller's shapefiles fromhttp://www.efele.net/maps/tz/world/)
Nice use of OSM ... Next step would be a nice link to data on a timezone ;) I've been looking into that for another couple of jobs, but it's well down the todo list.
I do have that too, I'm just still fixing up the demo online a little to add more information: http://maps.derickrethans.nl/?l=timezones,timezone&lat=38.60&lon=-86.90&zoom... Would you like to see anything added there? cheers, Derick
Derick Rethans wrote:
Derick Rethans wrote:
In the meanwhile, have a look at this (pretty) map showing all the timezones: http://maps.derickrethans.nl/?l=timezones&lat=50&lon=20&zoom=3 (Built with Eric Muller's shapefiles fromhttp://www.efele.net/maps/tz/world/)
Nice use of OSM ... Next step would be a nice link to data on a timezone;) I've been looking into that for another couple of jobs, but it's well down the todo list. I do have that too, I'm just still fixing up the demo online a little to add more information: http://maps.derickrethans.nl/?l=timezones,timezone&lat=38.60&lon=-86.90&zoom...
Would you like to see anything added there?
The 'wish list' from my end is to have a selectable overlay on OSM which gives historic information. So click on a timezone and go to a page which details the calendar back through time so we can cross check genealogical data. I've got a crude database driven site but it needs a lot more work on the calendar variations. At some point, clicking on the TZID on your pop-up would link to that type of data. More of a problem is mapping changes in boundaries ... not a lot have changed since daylight saving was introduced, but it's something that the historic OSM should be able to handle. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk
On Thu, Aug 15, 2013, at 5:18, Derick Rethans wrote:
Thanks - I appreciate that. In the meanwhile, have a look at this (pretty) map showing all the timezones: http://maps.derickrethans.nl/?l=timezones&lat=50&lon=20&zoom=3 (Built with Eric Muller's shapefiles from http://www.efele.net/maps/tz/world/)
cheers, Derick
Has anyone made a map / shapefiles for the proposed merged zones?
On 9 August 2013 14:44, Derick Rethans <tz@derickrethans.nl> wrote:
On Fri, 9 Aug 2013, David Patte ₯ wrote: However, I do agree with your concerns over things like this:
-HR +4548+01558 Europe/Zagreb +HR +4548+01558 Europe/Belgrade
I think this will give a *lot* of public outcry, with the other changes in the Balkans causing even more issues as suddenly people listing the zones for "HR" (Croatia) now will see the name of a Serbian city. This is *not* okay.
This is just plain wrong. Belgrade is not in Croatia. And it is naive to think that it would be remotely acceptable given recent history. I understand the desire to avoid politics, but time-zones are in their very essence political things. The politics cannot be avoided or sidestepped. (These may in theory "just" be IDs, but in practice they are used everywhere from developer code to UI. Pretending otherwise is naive and unhelpful). In addition, minimal change is *critical* for this data set. Its so widely used, that refactoring/tidying-up is simply not viable at this point. Please stop messing with the data and just focus on time changes. Thats all consumers of the data actually want. Stephen
participants (15)
-
Andrew Paprocki -
David Patte ₯ -
Derick Rethans -
Derick Rethans -
enh -
Ian Abbott -
Lester Caine -
Marc Lehmann -
Paul Eggert -
Paul_Koning@Dell.com -
Philip Newton -
random832@fastmail.us -
Steffen Daode Nurpmeso -
Stephen Colebourne -
Zoidsoft