summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Bishop <stuart@stuartbishop.net>2012-10-31 16:38:11 +0700
committerStuart Bishop <stuart@stuartbishop.net>2012-10-31 16:38:11 +0700
commit15ae6101892c40bb8b5f317f73d15ee656fe6e86 (patch)
tree0fbb110bde34be504c1ecc7aef95d85ffb802096
parent3150444558122babbb914d19e7b89c2ad751646c (diff)
downloadpytz-15ae6101892c40bb8b5f317f73d15ee656fe6e86.tar.gz
Import IANA database, 2012h
-rw-r--r--elsie.nci.nih.gov/src/Makefile4
-rw-r--r--elsie.nci.nih.gov/src/asia82
-rw-r--r--elsie.nci.nih.gov/src/date.c9
-rw-r--r--elsie.nci.nih.gov/src/southamerica15
-rw-r--r--elsie.nci.nih.gov/src/tz-link.htm24
-rw-r--r--elsie.nci.nih.gov/src/zdump.c80
6 files changed, 117 insertions, 97 deletions
diff --git a/elsie.nci.nih.gov/src/Makefile b/elsie.nci.nih.gov/src/Makefile
index ffd1cf0..ab0f54b 100644
--- a/elsie.nci.nih.gov/src/Makefile
+++ b/elsie.nci.nih.gov/src/Makefile
@@ -3,7 +3,7 @@
# 2009-05-17 by Arthur David Olson.
# Version numbers of the code and data distributions.
-VERSION= 2012g
+VERSION= 2012h
# Change the line below for your time zone (after finding the zone you want in
# the time zone files, or adding it to a time zone file).
@@ -455,7 +455,7 @@ typecheck:
make clean
for i in "long long" unsigned double; \
do \
- make CFLAGS="-DTYPECHECK -D_TIME_T \"-Dtime_t=$$i\"" ; \
+ make CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \
./zdump -v Europe/Rome ; \
make clean ; \
done
diff --git a/elsie.nci.nih.gov/src/asia b/elsie.nci.nih.gov/src/asia
index 8e896fc..7d12e8b 100644
--- a/elsie.nci.nih.gov/src/asia
+++ b/elsie.nci.nih.gov/src/asia
@@ -1170,15 +1170,15 @@ Rule Zion 2004 only - Sep 22 1:00 0 S
#
# ftp://ftp.cs.huji.ac.il/pub/tz/announcements/2005+beyond.ps
-# From Paul Eggert (2005-02-22):
+# From Paul Eggert (2012-10-26):
# I used Ephraim Silverberg's dst-israel.el program
# <ftp://ftp.cs.huji.ac.il/pub/tz/software/dst-israel.el> (2005-02-20)
# along with Ed Reingold's cal-hebrew in GNU Emacs 21.4,
-# to generate the transitions in this list.
+# to generate the transitions from 2005 through 2012.
# (I replaced "lastFri" with "Fri>=26" by hand.)
-# The spring transitions below all correspond to the following Rule:
+# The spring transitions all correspond to the following Rule:
#
-# Rule Zion 2005 max - Mar Fri>=26 2:00 1:00 D
+# Rule Zion 2005 2012 - Mar Fri>=26 2:00 1:00 D
#
# but older zic implementations (e.g., Solaris 8) do not support
# "Fri>=26" to mean April 1 in years like 2005, so for now we list the
@@ -1195,39 +1195,36 @@ Rule Zion 2009 only - Sep 27 2:00 0 S
Rule Zion 2010 only - Sep 12 2:00 0 S
Rule Zion 2011 only - Apr 1 2:00 1:00 D
Rule Zion 2011 only - Oct 2 2:00 0 S
-Rule Zion 2012 2015 - Mar Fri>=26 2:00 1:00 D
+Rule Zion 2012 only - Mar Fri>=26 2:00 1:00 D
Rule Zion 2012 only - Sep 23 2:00 0 S
-Rule Zion 2013 only - Sep 8 2:00 0 S
-Rule Zion 2014 only - Sep 28 2:00 0 S
-Rule Zion 2015 only - Sep 20 2:00 0 S
-Rule Zion 2016 only - Apr 1 2:00 1:00 D
-Rule Zion 2016 only - Oct 9 2:00 0 S
-Rule Zion 2017 2021 - Mar Fri>=26 2:00 1:00 D
-Rule Zion 2017 only - Sep 24 2:00 0 S
-Rule Zion 2018 only - Sep 16 2:00 0 S
-Rule Zion 2019 only - Oct 6 2:00 0 S
-Rule Zion 2020 only - Sep 27 2:00 0 S
-Rule Zion 2021 only - Sep 12 2:00 0 S
-Rule Zion 2022 only - Apr 1 2:00 1:00 D
-Rule Zion 2022 only - Oct 2 2:00 0 S
-Rule Zion 2023 2032 - Mar Fri>=26 2:00 1:00 D
-Rule Zion 2023 only - Sep 24 2:00 0 S
-Rule Zion 2024 only - Oct 6 2:00 0 S
-Rule Zion 2025 only - Sep 28 2:00 0 S
-Rule Zion 2026 only - Sep 20 2:00 0 S
-Rule Zion 2027 only - Oct 10 2:00 0 S
-Rule Zion 2028 only - Sep 24 2:00 0 S
-Rule Zion 2029 only - Sep 16 2:00 0 S
-Rule Zion 2030 only - Oct 6 2:00 0 S
-Rule Zion 2031 only - Sep 21 2:00 0 S
-Rule Zion 2032 only - Sep 12 2:00 0 S
-Rule Zion 2033 only - Apr 1 2:00 1:00 D
-Rule Zion 2033 only - Oct 2 2:00 0 S
-Rule Zion 2034 2037 - Mar Fri>=26 2:00 1:00 D
-Rule Zion 2034 only - Sep 17 2:00 0 S
-Rule Zion 2035 only - Oct 7 2:00 0 S
-Rule Zion 2036 only - Sep 28 2:00 0 S
-Rule Zion 2037 only - Sep 13 2:00 0 S
+
+# From Ephraim Silverberg (2012-10-18):
+
+# Yesterday, the Interior Ministry Committee, after more than a year
+# past, approved sending the proposed June 2011 changes to the Time
+# Decree Law back to the Knesset for second and third (final) votes
+# before the upcoming elections on Jan. 22, 2013. Hence, although the
+# changes are not yet law, they are expected to be so before Februray 2013.
+#
+# As of 2013, DST starts at 02:00 on the Friday before the last Sunday in March.
+# DST ends at 02:00 on the first Sunday after October 1, unless it occurs on the
+# second day of the Jewish Rosh Hashana holiday, in which case DST ends a day
+# later (i.e. at 02:00 the first Monday after October 2).
+# [Rosh Hashana holidays are factored in until 2100.]
+
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+Rule Zion 2013 max - Mar Fri>=23 2:00 1:00 D
+Rule Zion 2013 2026 - Oct Sun>=2 2:00 0 S
+Rule Zion 2027 only - Oct Mon>=3 2:00 0 S
+Rule Zion 2028 max - Oct Sun>=2 2:00 0 S
+# The following rules are commented out for now, as they break older
+# versions of zic that support only signed 32-bit timestamps, i.e.,
+# through 2038-01-19 03:14:07 UTC.
+#Rule Zion 2028 2053 - Oct Sun>=2 2:00 0 S
+#Rule Zion 2054 only - Oct Mon>=3 2:00 0 S
+#Rule Zion 2055 2080 - Oct Sun>=2 2:00 0 S
+#Rule Zion 2081 only - Oct Mon>=3 2:00 0 S
+#Rule Zion 2082 max - Oct Sun>=2 2:00 0 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Jerusalem 2:20:56 - LMT 1880
@@ -1362,6 +1359,16 @@ Zone Asia/Tokyo 9:18:59 - LMT 1887 Dec 31 15:00u
# From Arthur David Olson (2009-04-06):
# We still have Jordan switching to DST on Thursdays in 2000 and 2001.
+# From Steffen Thorsen (2012-10-25):
+# Yesterday the government in Jordan announced that they will not
+# switch back to standard time this winter, so the will stay on DST
+# until about the same time next year (at least).
+# http://www.petra.gov.jo/Public_News/Nws_NewsDetails.aspx?NewsID=88950
+#
+# From Paul Eggert (2012-10-25):
+# For now, assume this is just a one-year measure. If it becomes
+# permanent, we should move Jordan from EET to AST effective tomorrow.
+
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Jordan 1973 only - Jun 6 0:00 1:00 S
Rule Jordan 1973 1975 - Oct 1 0:00 0 -
@@ -1390,7 +1397,8 @@ Rule Jordan 2002 max - Mar lastThu 24:00 1:00 S
Rule Jordan 2003 only - Oct 24 0:00s 0 -
Rule Jordan 2004 only - Oct 15 0:00s 0 -
Rule Jordan 2005 only - Sep lastFri 0:00s 0 -
-Rule Jordan 2006 max - Oct lastFri 0:00s 0 -
+Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 -
+Rule Jordan 2013 max - Oct lastFri 0:00s 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Amman 2:23:44 - LMT 1931
2:00 Jordan EE%sT
diff --git a/elsie.nci.nih.gov/src/date.c b/elsie.nci.nih.gov/src/date.c
index b9578e1..b721ad9 100644
--- a/elsie.nci.nih.gov/src/date.c
+++ b/elsie.nci.nih.gov/src/date.c
@@ -439,6 +439,10 @@ extern int logwtmp();
#define settimeofday(t, tz) (settimeofday)(t)
#endif /* HAVE_SETTIMEOFDAY == 1 */
+#ifdef TSP_SETDATE
+static int netsettime(struct timeval);
+#endif
+
#ifndef TSP_SETDATE
/*ARGSUSED*/
#endif /* !defined TSP_SETDATE */
@@ -800,6 +804,7 @@ iffy(const time_t thist, const time_t thatt,
* notifies the master that a correction is needed.
* Returns 1 on success, 0 on failure.
*/
+static int
netsettime(struct timeval ntv)
{
int s, length, port, timed_ack, found, err;
@@ -812,7 +817,7 @@ netsettime(struct timeval ntv)
struct sockaddr_in sin, dest, from;
sp = getservbyname("timed", "udp");
- if (sp == 0) {
+ if (! sp) {
fputs(_("udp/timed: unknown service\n"), stderr);
retval = 2;
return (0);
@@ -869,7 +874,7 @@ loop:
tout.tv_usec = 0;
FD_ZERO(&ready);
FD_SET(s, &ready);
- found = select(FD_SETSIZE, &ready, 0, 0, &tout);
+ found = select(FD_SETSIZE, &ready, NULL, NULL, &tout);
length = sizeof err;
if (getsockopt(s, SOL_SOCKET, SO_ERROR, (char *)&err, &length) == 0
&& err) {
diff --git a/elsie.nci.nih.gov/src/southamerica b/elsie.nci.nih.gov/src/southamerica
index ab4d14d..3195846 100644
--- a/elsie.nci.nih.gov/src/southamerica
+++ b/elsie.nci.nih.gov/src/southamerica
@@ -829,6 +829,15 @@ Zone America/La_Paz -4:32:36 - LMT 1890
# http://www.in.gov.br/visualiza/index.jsp?data=13/10/2011&jornal=1000&pagina=6&totalArquivos=6
# </a>
+# From Kelley Cook (2012-10-16):
+# The governor of state of Bahia in Brazil announced on Thursday that
+# due to public pressure, he is reversing the DST policy they implemented
+# last year and will not be going to Summer Time on October 21st....
+# http://www.correio24horas.com.br/r/artigo/apos-pressoes-wagner-suspende-horario-de-verao-na-bahia
+
+# From Rodrigo Severo (2012-10-16):
+# Tocantins state will have DST.
+# http://noticias.terra.com.br/brasil/noticias/0,,OI6232536-EI306.html
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
# Decree <a href="http://pcdsh01.on.br/HV20466.htm">20,466</a> (1931-10-01)
@@ -1048,7 +1057,8 @@ Zone America/Araguaina -3:12:48 - LMT 1914
-3:00 Brazil BR%sT 1990 Sep 17
-3:00 - BRT 1995 Sep 14
-3:00 Brazil BR%sT 2003 Sep 24
- -3:00 - BRT
+ -3:00 - BRT 2012 Oct 21
+ -3:00 Brazil BR%sT
#
# Alagoas (AL), Sergipe (SE)
Zone America/Maceio -2:22:52 - LMT 1914
@@ -1067,7 +1077,8 @@ Zone America/Maceio -2:22:52 - LMT 1914
Zone America/Bahia -2:34:04 - LMT 1914
-3:00 Brazil BR%sT 2003 Sep 24
-3:00 - BRT 2011 Oct 16
- -3:00 Brazil BR%sT
+ -3:00 Brazil BR%sT 2012 Oct 21
+ -3:00 - BRT
#
# Goias (GO), Distrito Federal (DF), Minas Gerais (MG),
# Espirito Santo (ES), Rio de Janeiro (RJ), Sao Paulo (SP), Parana (PR),
diff --git a/elsie.nci.nih.gov/src/tz-link.htm b/elsie.nci.nih.gov/src/tz-link.htm
index f4371df..d1a8bf1 100644
--- a/elsie.nci.nih.gov/src/tz-link.htm
+++ b/elsie.nci.nih.gov/src/tz-link.htm
@@ -8,22 +8,15 @@
<meta http-equiv="Content-type" content='text/html; charset="US-ASCII"'>
<meta name="DC.Creator" content="Eggert, Paul">
<meta name="DC.Contributor" content="Olson, Arthur David">
-<meta name="DC.Date" content="2012-07-19">
+<meta name="DC.Date" content="2012-10-26">
<meta name="DC.Description"
content="Sources of information about time zones and daylight saving time">
-<meta name="DC.Identifier" content="http://www.twinsun.com/tz/tz-link.htm">
+<meta name="DC.Identifier" content="http://cs.ucla.edu/~eggert/tz/tz-link.htm">
<meta name="Keywords"
content="database,daylight saving,DST,time zone,timezone,tz,zoneinfo">
</head>
<body>
<h1>Sources for Time Zone and Daylight Saving Time Data</h1>
-<p>
-This file is in the public domain, so clarified as of
-2009-05-17 by Arthur David Olson.
-</p>
-<p>
-Please send corrections to this web page to the
-<a href="mailto:tz@iana.org">time zone mailing list</a>.</p>
<h2>The <code>tz</code> database</h2>
<p>
The <a href="http://en.wikipedia.org/wiki/Public_domain">public-domain</a>
@@ -38,13 +31,14 @@ title="Coordinated Universal Time">UTC</abbr></a> offsets, and
<a href="http://en.wikipedia.org/wiki/Daylight_saving">daylight-saving</a>
rules.
This database (often called <code>zoneinfo</code> or <a
-href="http://en.wikipedia.org/wiki/TZ_database"><code>tz</code></a>)
+href="http://en.wikipedia.org/wiki/Tz_database"><code>tz</code></a>)
is used by several implementations,
including
<a href="http://www.gnu.org/software/libc/">the
<abbr title="GNU's Not Unix">GNU</abbr>
C Library</a> used in
<a href="http://www.linux.org/"><abbr>GNU</abbr>/Linux</a>,
+<a href="http://www.android.com/">Android</a>,
<a href="http://www.freebsd.org/">FreeBSD</a>,
<a href="http://netbsd.org/">NetBSD</a>,
<a href="http://openbsd.org/">OpenBSD</a>,
@@ -52,9 +46,9 @@ C Library</a> used in
<a href="http://www.delorie.com/djgpp/"><abbr
title="DJ's GNU Programming Platform">DJGPP</abbr></a>,
<a href="http://ibm.com/aix">AIX</a>,
-<a href="http://www.apple.com/macosx/">Mac OS X</a>,
<a href="http://h71000.www7.hp.com/">OpenVMS</a>,
<a href="http://oracle.com/database">Oracle Database</a>,
+<a href="http://www.apple.com/osx/">OS X</a>,
<a href="http://sun.com/software/solaris">Solaris</a>,
<a href="http://h30097.www3.hp.com/">Tru64</a>, and
<a href="http://sco.com/products/unixware">UnixWare</a>.</p>
@@ -699,5 +693,13 @@ Reference: Time</a></li>
<li><a href="http://dir.yahoo.com/Science/Measurements_and_Units/Time">Yahoo!
Directory &gt; Science &gt; Measurements and Units &gt; Time</a></li>
</ul>
+<hr>
+<address>
+This file is in the public domain, so clarified as of
+2009-05-17 by Arthur David Olson.
+<br>
+Please send corrections to this web page to the
+<a href="mailto:tz@iana.org">time zone mailing list</a>.
+</address>
</body>
</html>
diff --git a/elsie.nci.nih.gov/src/zdump.c b/elsie.nci.nih.gov/src/zdump.c
index 6caa7a2..805267d 100644
--- a/elsie.nci.nih.gov/src/zdump.c
+++ b/elsie.nci.nih.gov/src/zdump.c
@@ -17,6 +17,7 @@
#include "time.h" /* for struct tm */
#include "stdlib.h" /* for exit, malloc, atoi */
#include "float.h" /* for FLT_MAX and DBL_MAX */
+#include "limits.h" /* for CHAR_BIT, LLONG_MAX */
#include "ctype.h" /* for isalpha et al. */
#ifndef isascii
#define isascii(x) 1
@@ -150,8 +151,35 @@ extern char * optarg;
extern int optind;
extern char * tzname[2];
-static time_t absolute_min_time;
-static time_t absolute_max_time;
+/* The minimum and maximum finite time values. Shift 'long long' or
+ 'long' instead of 'time_t'; this avoids compile-time errors when
+ time_t is floating-point. In practice, 'long long' is wide enough. */
+static time_t const absolute_min_time =
+ ((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)
+ : (time_t) -1 < 0
+#ifdef LLONG_MAX
+ ? (time_t) ((long long) -1 << (CHAR_BIT * sizeof (time_t) - 1))
+#else
+ ? (time_t) ((long) -1 << (CHAR_BIT * sizeof (time_t) - 1))
+#endif
+ : 0);
+static time_t const absolute_max_time =
+ ((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)
+ : (time_t) -1 < 0
+#ifdef LLONG_MAX
+ ? (time_t) (- (~ 0 < 0) - ((long long) -1 << (CHAR_BIT * sizeof (time_t) - 1)))
+#else
+ ? (time_t) (- (~ 0 < 0) - ((long) -1 << (CHAR_BIT * sizeof (time_t) - 1)))
+#endif
+ : (time_t) -1);
static size_t longest;
static char * progname;
static int warned;
@@ -161,7 +189,7 @@ static void abbrok(const char * abbrp, const char * zone);
static long delta(struct tm * newp, struct tm * oldp) ATTRIBUTE_PURE;
static void dumptime(const struct tm * tmp);
static time_t hunt(char * name, time_t lot, time_t hit);
-static void setabsolutes(void);
+static void checkabsolutes(void);
static void show(char * zone, time_t t, int v);
static const char * tformat(void);
static time_t yeartot(long y) ATTRIBUTE_PURE;
@@ -314,7 +342,7 @@ main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
}
- setabsolutes();
+ checkabsolutes();
cutlotime = yeartot(cutloyear);
cuthitime = yeartot(cuthiyear);
}
@@ -404,47 +432,13 @@ main(int argc, char *argv[])
}
static void
-setabsolutes(void)
+checkabsolutes(void)
{
- if (0.5 == (time_t) 0.5) {
- /*
- ** time_t is floating.
- */
- if (sizeof (time_t) == sizeof (float)) {
- absolute_min_time = (time_t) -FLT_MAX;
- absolute_max_time = (time_t) FLT_MAX;
- } else if (sizeof (time_t) == sizeof (double)) {
- absolute_min_time = (time_t) -DBL_MAX;
- absolute_max_time = (time_t) DBL_MAX;
- } else {
- (void) fprintf(stderr,
+ if (absolute_max_time < absolute_min_time) {
+ (void) fprintf(stderr,
_("%s: use of -v on system with floating time_t other than float or double\n"),
- progname);
- exit(EXIT_FAILURE);
- }
- } else if (0 > (time_t) -1) {
- /*
- ** time_t is signed. Assume overflow wraps around.
- */
- time_t t = 0;
- time_t t1 = 1;
-
- while (t < t1) {
- t = t1;
- t1 = 2 * t1 + 1;
- }
-
- absolute_max_time = t;
- t = -t;
- absolute_min_time = t - 1;
- if (t < absolute_min_time)
- absolute_min_time = t;
- } else {
- /*
- ** time_t is unsigned.
- */
- absolute_min_time = 0;
- absolute_max_time = absolute_min_time - 1;
+ progname);
+ exit(EXIT_FAILURE);
}
}