summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Bishop <stuart@stuartbishop.net>2014-03-25 13:50:38 +0700
committerStuart Bishop <stuart@stuartbishop.net>2014-03-25 13:50:38 +0700
commit839fd74df8b9ed3b3cdbca17f85475fe1efc602a (patch)
tree3927d6118ab61b2e26c6c228f3b644669ee96cdb
parent4252eaa41454da5b41f9f7d8bf4fcd22fe83cd58 (diff)
downloadpytz-839fd74df8b9ed3b3cdbca17f85475fe1efc602a.tar.gz
Import IANA database 2014b
-rw-r--r--Makefile23
-rw-r--r--elsie.nci.nih.gov/src/Makefile2
-rw-r--r--elsie.nci.nih.gov/src/NEWS41
-rw-r--r--elsie.nci.nih.gov/src/africa5
-rw-r--r--elsie.nci.nih.gov/src/antarctica41
-rw-r--r--elsie.nci.nih.gov/src/australasia21
-rw-r--r--elsie.nci.nih.gov/src/checktab.awk20
-rw-r--r--elsie.nci.nih.gov/src/europe6
-rw-r--r--elsie.nci.nih.gov/src/newtzset.32
-rw-r--r--elsie.nci.nih.gov/src/newtzset.3.txt2
-rw-r--r--elsie.nci.nih.gov/src/private.h4
-rw-r--r--elsie.nci.nih.gov/src/tz-link.htm13
-rw-r--r--elsie.nci.nih.gov/src/tzfile.h2
-rw-r--r--elsie.nci.nih.gov/src/zic.c65
-rw-r--r--elsie.nci.nih.gov/src/zone.tab3
15 files changed, 190 insertions, 60 deletions
diff --git a/Makefile b/Makefile
index 8577073..205fee6 100644
--- a/Makefile
+++ b/Makefile
@@ -41,21 +41,28 @@ dist: build/dist/locales/pytz.pot .stamp-dist
upload: dist build/dist/locales/pytz.pot .stamp-upload
.stamp-upload: .stamp-tzinfo
cd build/dist && \
- ${PYTHON} setup.py register sdist \
+ echo ${PYTHON} setup.py register sdist \
--formats=bztar,gztar,zip --dist-dir=../tarballs \
- upload --sign && \
+ upload --sign
+ -cd build/dist && \
${PYTHON24} setup.py register bdist_egg --dist-dir=../tarballs \
- upload --sign && \
+ upload --sign
+ -cd build/dist && \
${PYTHON25} setup.py register bdist_egg --dist-dir=../tarballs \
- upload --sign && \
+ upload --sign
+ -cd build/dist && \
${PYTHON26} setup.py register bdist_egg --dist-dir=../tarballs \
- upload --sign && \
+ upload --sign
+ -cd build/dist && \
${PYTHON27} setup.py register bdist_egg --dist-dir=../tarballs \
- upload --sign && \
+ upload --sign
+ -cd build/dist && \
${PYTHON33} setup.py register bdist_egg --dist-dir=../tarballs \
- upload --sign && \
+ upload --sign
+ -cd build/dist && \
${PYTHON32} setup.py register bdist_egg --dist-dir=../tarballs \
- upload --sign && \
+ upload --sign
+ -cd build/dist && \
${PYTHON31} setup.py register bdist_egg --dist-dir=../tarballs \
upload --sign
touch $@
diff --git a/elsie.nci.nih.gov/src/Makefile b/elsie.nci.nih.gov/src/Makefile
index c772d99..ffe57db 100644
--- a/elsie.nci.nih.gov/src/Makefile
+++ b/elsie.nci.nih.gov/src/Makefile
@@ -6,7 +6,7 @@
PACKAGE= tzcode
# Version numbers of the code and data distributions.
-VERSION= 2014a
+VERSION= 2014b
# Email address for bug reports.
BUGEMAIL= tz@iana.org
diff --git a/elsie.nci.nih.gov/src/NEWS b/elsie.nci.nih.gov/src/NEWS
index ba6e601..de7400a 100644
--- a/elsie.nci.nih.gov/src/NEWS
+++ b/elsie.nci.nih.gov/src/NEWS
@@ -1,6 +1,45 @@
News for the tz database
+Release 2014b - 2014-03-24 21:28:50 -0700
+
+ Changes affecting near-future time stamps
+
+ Crimea switches to Moscow time on 2014-03-30 at 02:00 local time.
+ (Thanks to Alexander Krivenyshev.) Move its zone.tab entry from UA to RU.
+
+ New entry for Troll station, Antarctica. (Thanks to Paul-Inge Flakstad and
+ Bengt-Inge Larsson.) This is currently an approximation; a better version
+ will require the zic and localtime fixes mentioned below, and the plan is
+ to wait for a while until at least the zic fixes propagate.
+
+ Changes affecting code
+
+ 'zic' and 'localtime' no longer reject locations needing four transitions
+ per year for the forseeable future. (Thanks to Andrew Main (Zefram).)
+ Also, 'zic' avoids some unlikely failures due to integer overflow.
+
+ Changes affecting build procedure
+
+ 'make check' now detects Rule lines defined but never used.
+ The NZAQ rules, an instance of this problem, have been removed.
+
+ Changes affecting commentary and documentation
+
+ Fix Tuesday/Thursday typo in description of time in Israel.
+ (Thanks to Bert Katz via Pavel Kharitonov and Mike Frysinger.)
+
+ Microsoft Windows 8.1 doesn't support tz database names. (Thanks
+ to Donald MacQueen.) Instead, the Microsoft Windows Store app
+ library supports them.
+
+ Add comments about Johnston Island time in the 1960s.
+ (Thanks to Lyle McElhaney.)
+
+ Morocco's 2014 DST start will be as predicted.
+ (Thanks to Sebastien Willemijns.)
+
+
Release 2014a - 2014-03-07 23:30:29 -0800
Changes affecting near-future time stamps
@@ -48,7 +87,7 @@ Release 2014a - 2014-03-07 23:30:29 -0800
Mention xCal (Internet RFC 6321) and jCal.
- Microsoft Windows 8.1 and later support tz database names.
+ Microsoft has some support for tz database names.
CLDR data is available in both XML and JSON form.
diff --git a/elsie.nci.nih.gov/src/africa b/elsie.nci.nih.gov/src/africa
index 029e5c2..fbf0b65 100644
--- a/elsie.nci.nih.gov/src/africa
+++ b/elsie.nci.nih.gov/src/africa
@@ -868,7 +868,10 @@ Zone Indian/Mayotte 3:00:56 - LMT 1911 Jul # Mamoutzou
# Another source (specifying the time for start and end in the decree):
# http://www.lemag.ma/Heure-d-ete-au-Maroc-jusqu-au-27-octobre_a75620.html
-# From Paul Eggert (2013-10-03):
+# From Sebastien Willemijns (2014-03-18):
+# http://www.afriquinfos.com/articles/2014/3/18/maroc-heure-dete-avancez-tous-horloges-247891.asp
+
+# From Paul Eggert (2014-03-19):
# To estimate what the Moroccan government will do in future years,
# transition dates for 2014 through 2038 were determined by running
# the following program under GNU Emacs 24.3:
diff --git a/elsie.nci.nih.gov/src/antarctica b/elsie.nci.nih.gov/src/antarctica
index 5333b7b..8f8e408 100644
--- a/elsie.nci.nih.gov/src/antarctica
+++ b/elsie.nci.nih.gov/src/antarctica
@@ -230,24 +230,41 @@ Zone Antarctica/Syowa 0 - zzz 1957 Jan 29
# year-round base
# Scott Base, Ross Island, since 1957-01.
# See Pacific/Auckland.
-#
-# These rules for New Zealand are stolen from the 'australasia' file.
-# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
-Rule NZAQ 1974 only - Nov 3 2:00s 1:00 D
-Rule NZAQ 1975 1988 - Oct lastSun 2:00s 1:00 D
-Rule NZAQ 1989 only - Oct 8 2:00s 1:00 D
-Rule NZAQ 1990 2006 - Oct Sun>=1 2:00s 1:00 D
-Rule NZAQ 1975 only - Feb 23 2:00s 0 S
-Rule NZAQ 1976 1989 - Mar Sun>=1 2:00s 0 S
-Rule NZAQ 1990 2007 - Mar Sun>=15 2:00s 0 S
-Rule NZAQ 2007 max - Sep lastSun 2:00s 1:00 D
-Rule NZAQ 2008 max - Apr Sun>=1 2:00s 0 S
# Norway - territories
# Bouvet (never inhabited)
#
# claims
# Peter I Island (never inhabited)
+#
+# year-round base
+# Troll, Queen Maud Land, -720041+0023206, since 2005-02-12
+#
+# From Paul-Inge Flakstad (2014-03-10):
+# I recently had a long dialog about this with the developer of timegenie.com.
+# In the absence of specific dates, he decided to choose some likely ones:
+# GMT +1 - From March 1 to the last Sunday in March
+# GMT +2 - From the last Sunday in March until the last Sunday in October
+# GMT +1 - From the last Sunday in October until November 7
+# GMT +0 - From November 7 until March 1
+# The dates for switching to and from UTC+0 will probably not be absolutely
+# correct, but they should be quite close to the actual dates.
+#
+# From Paul Eggert (2014-03-21):
+# The CET-switching Troll rules require zic from tzcode 2014b or later, so as
+# suggested by Bengt-Inge Larsson comment them out for now, and approximate
+# with only UTC and CEST. Uncomment them when 2014b is more prevalent.
+#
+# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
+#Rule Troll 2005 max - Mar 1 1:00u 1:00 CET
+Rule Troll 2005 max - Mar lastSun 1:00u 2:00 CEST
+#Rule Troll 2005 max - Oct lastSun 1:00u 1:00 CET
+#Rule Troll 2004 max - Nov 7 1:00u 0:00 UTC
+# Remove the following line when uncommenting the above '#Rule' lines.
+Rule Troll 2004 max - Oct lastSun 1:00u 0:00 UTC
+# Zone NAME GMTOFF RULES FORMAT [UNTIL]
+Zone Antarctica/Troll 0 - zzz 2005 Feb 12
+ 0:00 Troll %s
# Poland - year-round base
# Arctowski, King George Island, -620945-0582745, since 1977
diff --git a/elsie.nci.nih.gov/src/australasia b/elsie.nci.nih.gov/src/australasia
index f7fa628..a61c184 100644
--- a/elsie.nci.nih.gov/src/australasia
+++ b/elsie.nci.nih.gov/src/australasia
@@ -763,14 +763,29 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
# Johnston
#
-# From Paul Eggert (2013-09-03):
+# From Paul Eggert (2014-03-11):
+# Sometimes Johnston kept Hawaii time, and sometimes it was an hour behind.
+# Details are uncertain. We have no data for Johnston after 1970, so
+# treat it like Hawaii for now.
+#
# In his memoirs of June 6th to October 4, 1945
# <http://www.315bw.org/Herb_Bach.htm> (2005), Herbert C. Bach writes,
# "We started our letdown to Kwajalein Atoll and landed there at 5:00 AM
# Johnston time, 1:30 AM Kwajalein time." This was in June 1945, and
# confirms that Johnston kept the same time as Honolulu in summer 1945.
-# We have no better information, so for now, assume this has been true
-# indefinitely into the past.
+#
+# From Lyle McElhaney (2014-03-11):
+# [W]hen JI was being used for that [atomic bomb] testing, the time being used
+# was not Hawaiian time but rather the same time being used on the ships,
+# which had a GMT offset of -11 hours. This apparently applied to at least the
+# time from Operation Newsreel (Hardtack I/Teak shot, 1958-08-01) to the last
+# Operation Fishbowl shot (Tightrope, 1962-11-04).... [See] Herman Hoerlin,
+# "The United States High-Altitude Test Experience: A Review Emphasizing the
+# Impact on the Environment", Los Alamos LA-6405, Oct 1976
+# <http://www.fas.org/sgp/othergov/doe/lanl/docs1/00322994.pdf>.
+# See the table on page 4 where he lists GMT and local times for the tests; a
+# footnote for the JI tests reads that local time is "JI time = Hawaii Time
+# Minus One Hour".
#
# See 'northamerica' for Pacific/Johnston.
diff --git a/elsie.nci.nih.gov/src/checktab.awk b/elsie.nci.nih.gov/src/checktab.awk
index fec4f62..d78ba73 100644
--- a/elsie.nci.nih.gov/src/checktab.awk
+++ b/elsie.nci.nih.gov/src/checktab.awk
@@ -115,10 +115,14 @@ BEGIN {
FS = " "
}
+$1 ~ /^#/ { next }
+
{
- tz = ""
- if ($1 == "Zone") tz = $2
- if ($1 == "Link") {
+ tz = rules = ""
+ if ($1 == "Zone") {
+ tz = $2
+ ruleUsed[$4] = 1
+ } else if ($1 == "Link") {
# Ignore Link commands if source and destination basenames
# are identical, e.g. Europe/Istanbul versus Asia/Istanbul.
src = $2
@@ -126,6 +130,10 @@ BEGIN {
while ((i = index(src, "/"))) src = substr(src, i+1)
while ((i = index(dst, "/"))) dst = substr(dst, i+1)
if (src != dst) tz = $3
+ } else if ($1 == "Rule") {
+ ruleDefined[$2] = 1
+ } else {
+ ruleUsed[$2] = 1
}
if (tz && tz ~ /\//) {
if (!tztab[tz]) {
@@ -138,6 +146,12 @@ BEGIN {
}
END {
+ for (tz in ruleDefined) {
+ if (!ruleUsed[tz]) {
+ printf "%s: Rule never used\n", tz
+ status = 1
+ }
+ }
for (tz in tz2cc) {
if (!zoneSeen[tz]) {
printf "%s:%d: no Zone table for `%s'\n", \
diff --git a/elsie.nci.nih.gov/src/europe b/elsie.nci.nih.gov/src/europe
index 553735e..f9a3392 100644
--- a/elsie.nci.nih.gov/src/europe
+++ b/elsie.nci.nih.gov/src/europe
@@ -2963,7 +2963,11 @@ Zone Europe/Simferopol 2:16:24 - LMT 1880
# Assume it happened in March by not changing the clocks.
3:00 Russia MSK/MSD 1997
3:00 - MSK 1997 Mar lastSun 1:00u
- 2:00 EU EE%sT
+# From Alexander Krivenyshev (2014-03-17):
+# time change at 2:00 (2am) on March 30, 2014
+# http://vz.ru/news/2014/3/17/677464.html
+ 2:00 EU EE%sT 2014 Mar 30 2:00
+ 4:00 - MSK
# Vatican City
# See Europe/Rome.
diff --git a/elsie.nci.nih.gov/src/newtzset.3 b/elsie.nci.nih.gov/src/newtzset.3
index 1251aa1..2568e45 100644
--- a/elsie.nci.nih.gov/src/newtzset.3
+++ b/elsie.nci.nih.gov/src/newtzset.3
@@ -213,7 +213,7 @@ first Sunday on or after January 18).
.B IST\(mi2IDT,M3.4.4/26,M10.5.0
stands for Israel Standard Time (IST) and Israel Daylight Time (IDT),
2 hours ahead of UTC, springing forward on March's fourth
-Tuesday at 26:00 (i.e., 02:00 on the first Friday on or after March
+Thursday at 26:00 (i.e., 02:00 on the first Friday on or after March
23), and falling back on October's last Sunday at 02:00.
.TP
.B WART4WARST,J1/0,J365/25
diff --git a/elsie.nci.nih.gov/src/newtzset.3.txt b/elsie.nci.nih.gov/src/newtzset.3.txt
index 1c92a43..25ac631 100644
--- a/elsie.nci.nih.gov/src/newtzset.3.txt
+++ b/elsie.nci.nih.gov/src/newtzset.3.txt
@@ -134,7 +134,7 @@ DESCRIPTION
IST-2IDT,M3.4.4/26,M10.5.0
stands for Israel Standard Time (IST) and Israel Daylight Time
(IDT), 2 hours ahead of UTC, springing forward on March's fourth
- Tuesday at 26:00 (i.e., 02:00 on the first Friday on or after
+ Thursday at 26:00 (i.e., 02:00 on the first Friday on or after
March 23), and falling back on October's last Sunday at 02:00.
WART4WARST,J1/0,J365/25
diff --git a/elsie.nci.nih.gov/src/private.h b/elsie.nci.nih.gov/src/private.h
index 4eb0ab6..1a85c88 100644
--- a/elsie.nci.nih.gov/src/private.h
+++ b/elsie.nci.nih.gov/src/private.h
@@ -205,6 +205,10 @@ typedef unsigned long uintmax_t;
#define INT32_MIN (-1 - INT32_MAX)
#endif /* !defined INT32_MIN */
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t) -1)
+#endif
+
#if 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
# define ATTRIBUTE_CONST __attribute__ ((const))
# define ATTRIBUTE_PURE __attribute__ ((__pure__))
diff --git a/elsie.nci.nih.gov/src/tz-link.htm b/elsie.nci.nih.gov/src/tz-link.htm
index c820e98..c7af0f8 100644
--- a/elsie.nci.nih.gov/src/tz-link.htm
+++ b/elsie.nci.nih.gov/src/tz-link.htm
@@ -8,7 +8,7 @@
<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="2014-02-19">
+<meta name="DC.Date" content="2014-03-10">
<meta name="DC.Description"
content="Sources of information about time zones and daylight saving time">
<meta name="DC.Identifier"
@@ -57,7 +57,6 @@ title="Advanced Interactive eXecutive">AIX</abbr></a>,
<a href="http://en.wikipedia.org/wiki/BlackBerry_10">BlackBerry 10</a>,
<a href="http://www.apple.com/ios/"><abbr
title="iPhone OS">iOS</abbr></a>,
-<a href="http://windows.microsoft.com/">Microsoft Windows</a>,
<a href="http://h71000.www7.hp.com/">Open<abbr
title="Virtual Memory System">VMS</abbr></a>,
<a href="http://oracle.com/database">Oracle Database</a>,
@@ -404,14 +403,14 @@ Schedules Information Manual</a> of the
<a href="http://iata.org/index.htm">International Air Transport
Association</a>
gives current time zone rules for airports served by commercial aviation.</li>
-<li>Although Microsoft Windows 8.1 and later supports
-the <code><abbr>tz</abbr></code> database names directly, many of its
-applications use time zone information in an undocumented format
-from earlier releases, with <abbr>ID</abbr>s that can be mapped to
+<li>Some Microsoft Windows versions contain time zone information in
+an undocumented format, with <abbr>ID</abbr>s that can be mapped to
<code><abbr>TZ</abbr></code> values using the <a
href="http://unicode.org/cldr/charts/supplemental/zone_tzid.html">Zone
&rarr; Tzid table</a> in the <abbr>CLDR</abbr> data mentioned
-below.</li>
+below, or via <a href="http://msdn.microsoft.com/en-us/windows/apps">Windows
+Store apps</a> classes such as <a
+href="http://msdn.microsoft.com/en-us/library/windows/apps/dn264145.aspx">DateTimeFormatter</a>.</li>
</ul>
<h2>Maps</h2>
<ul>
diff --git a/elsie.nci.nih.gov/src/tzfile.h b/elsie.nci.nih.gov/src/tzfile.h
index 529650d..911130e 100644
--- a/elsie.nci.nih.gov/src/tzfile.h
+++ b/elsie.nci.nih.gov/src/tzfile.h
@@ -97,7 +97,7 @@ struct tzhead {
*/
#ifndef TZ_MAX_TIMES
-#define TZ_MAX_TIMES 1200
+#define TZ_MAX_TIMES 2000
#endif /* !defined TZ_MAX_TIMES */
#ifndef TZ_MAX_TYPES
diff --git a/elsie.nci.nih.gov/src/zic.c b/elsie.nci.nih.gov/src/zic.c
index e7b0081..34b3dc1 100644
--- a/elsie.nci.nih.gov/src/zic.c
+++ b/elsie.nci.nih.gov/src/zic.c
@@ -162,6 +162,7 @@ static const char * rfilename;
static int rlinenum;
static const char * progname;
static int timecnt;
+static int timecnt_alloc;
static int typecnt;
/*
@@ -247,9 +248,11 @@ static int typecnt;
static struct rule * rules;
static int nrules; /* number of rules */
+static int nrules_alloc;
static struct zone * zones;
static int nzones; /* number of zones */
+static int nzones_alloc;
struct link {
const char * l_filename;
@@ -260,6 +263,7 @@ struct link {
static struct link * links;
static int nlinks;
+static int nlinks_alloc;
struct lookup {
const char * l_word;
@@ -346,7 +350,7 @@ static const int len_years[2] = {
static struct attype {
zic_t at;
unsigned char type;
-} attypes[TZ_MAX_TIMES];
+} * attypes;
static zic_t gmtoffs[TZ_MAX_TYPES];
static char isdsts[TZ_MAX_TYPES];
static unsigned char abbrinds[TZ_MAX_TYPES];
@@ -361,16 +365,26 @@ static char roll[TZ_MAX_LEAPS];
** Memory allocation.
*/
+static _Noreturn void
+memory_exhausted(const char *msg)
+{
+ fprintf(stderr, _("%s: Memory exhausted: %s\n"), progname, msg);
+ exit(EXIT_FAILURE);
+}
+
+static ATTRIBUTE_PURE size_t
+size_product(size_t nitems, size_t itemsize)
+{
+ if (SIZE_MAX / itemsize < nitems)
+ memory_exhausted("size overflow");
+ return nitems * itemsize;
+}
+
static ATTRIBUTE_PURE void *
memcheck(void *const ptr)
{
- if (ptr == NULL) {
- const char *e = strerror(errno);
-
- (void) fprintf(stderr, _("%s: Memory exhausted: %s\n"),
- progname, e);
- exit(EXIT_FAILURE);
- }
+ if (ptr == NULL)
+ memory_exhausted(strerror(errno));
return ptr;
}
@@ -379,6 +393,20 @@ memcheck(void *const ptr)
#define ecpyalloc(ptr) memcheck(icpyalloc(ptr))
#define ecatalloc(oldp, newp) memcheck(icatalloc((oldp), (newp)))
+static void *
+growalloc(void *ptr, size_t itemsize, int nitems, int *nitems_alloc)
+{
+ if (nitems < *nitems_alloc)
+ return ptr;
+ else {
+ int amax = INT_MAX < SIZE_MAX ? INT_MAX : SIZE_MAX;
+ if ((amax - 1) / 3 * 2 < *nitems_alloc)
+ memory_exhausted("int overflow");
+ *nitems_alloc = *nitems_alloc + (*nitems_alloc >> 1) + 1;
+ return erealloc(ptr, size_product(*nitems_alloc, itemsize));
+ }
+}
+
/*
** Error handling.
*/
@@ -965,7 +993,7 @@ inrule(register char **const fields, const int nfields)
r.r_abbrvar = ecpyalloc(fields[RF_ABBRVAR]);
if (max_abbrvar_len < strlen(r.r_abbrvar))
max_abbrvar_len = strlen(r.r_abbrvar);
- rules = erealloc(rules, (nrules + 1) * sizeof *rules);
+ rules = growalloc(rules, sizeof *rules, nrules, &nrules_alloc);
rules[nrules++] = r;
}
@@ -1081,7 +1109,7 @@ inzsub(register char **const fields, const int nfields, const int iscont)
return FALSE;
}
}
- zones = erealloc(zones, (nzones + 1) * sizeof *zones);
+ zones = growalloc(zones, sizeof *zones, nzones, &nzones_alloc);
zones[nzones++] = z;
/*
** If there was an UNTIL field on this line,
@@ -1214,7 +1242,7 @@ inlink(register char **const fields, const int nfields)
l.l_linenum = linenum;
l.l_from = ecpyalloc(fields[LF_FROM]);
l.l_to = ecpyalloc(fields[LF_TO]);
- links = erealloc(links, (nlinks + 1) * sizeof *links);
+ links = growalloc(links, sizeof *links, nlinks, &nlinks_alloc);
links[nlinks++] = l;
}
@@ -1434,8 +1462,9 @@ writezone(const char *const name, const char *const string, char version)
static char * fullname;
static const struct tzhead tzh0;
static struct tzhead tzh;
- zic_t ats[TZ_MAX_TIMES];
- unsigned char types[TZ_MAX_TIMES];
+ zic_t *ats = emalloc(size_product(timecnt, sizeof *ats + 1));
+ void *typesptr = ats + timecnt;
+ unsigned char *types = typesptr;
/*
** Sort.
@@ -1539,7 +1568,7 @@ writezone(const char *const name, const char *const string, char version)
register int thistimei, thistimecnt;
register int thisleapi, thisleapcnt;
register int thistimelim, thisleaplim;
- int writetype[TZ_MAX_TIMES];
+ int writetype[TZ_MAX_TYPES];
int typemap[TZ_MAX_TYPES];
register int thistypecnt;
char thischars[TZ_MAX_CHARS];
@@ -1751,6 +1780,7 @@ writezone(const char *const name, const char *const string, char version)
progname, fullname);
exit(EXIT_FAILURE);
}
+ free(ats);
}
static void
@@ -2370,10 +2400,7 @@ addtt(const zic_t starttime, int type)
timecnt = 0;
type = 0;
}
- if (timecnt >= TZ_MAX_TIMES) {
- error(_("too many transitions?!"));
- exit(EXIT_FAILURE);
- }
+ attypes = growalloc(attypes, sizeof *attypes, timecnt, &timecnt_alloc);
attypes[timecnt].at = starttime;
attypes[timecnt].type = type;
++timecnt;
@@ -2572,7 +2599,7 @@ getfields(register char *cp)
if (cp == NULL)
return NULL;
- array = emalloc((strlen(cp) + 1) * sizeof *array);
+ array = emalloc(size_product(strlen(cp) + 1, sizeof *array));
nsubs = 0;
for ( ; ; ) {
while (isascii((unsigned char) *cp) &&
diff --git a/elsie.nci.nih.gov/src/zone.tab b/elsie.nci.nih.gov/src/zone.tab
index fa4df5f..923d6ac 100644
--- a/elsie.nci.nih.gov/src/zone.tab
+++ b/elsie.nci.nih.gov/src/zone.tab
@@ -51,6 +51,7 @@ AQ -6617+11031 Antarctica/Casey Casey Station, Bailey Peninsula
AQ -7824+10654 Antarctica/Vostok Vostok Station, Lake Vostok
AQ -6640+14001 Antarctica/DumontDUrville Dumont-d'Urville Station, Terre Adelie
AQ -690022+0393524 Antarctica/Syowa Syowa Station, E Ongul I
+AQ -720041+0023206 Antarctica/Troll Troll Station, Queen Maud Land
AR -3436-05827 America/Argentina/Buenos_Aires Buenos Aires (BA, CF)
AR -3124-06411 America/Argentina/Cordoba most locations (CB, CC, CN, ER, FM, MN, SE, SF)
AR -2447-06525 America/Argentina/Salta (SA, LP, NQ, RN)
@@ -343,6 +344,7 @@ RU +5443+02030 Europe/Kaliningrad Moscow-01 - Kaliningrad
RU +5545+03735 Europe/Moscow Moscow+00 - west Russia
RU +4844+04425 Europe/Volgograd Moscow+00 - Caspian Sea
RU +5312+05009 Europe/Samara Moscow+00 - Samara, Udmurtia
+RU +4457+03406 Europe/Simferopol Moscow+00 - Crimea
RU +5651+06036 Asia/Yekaterinburg Moscow+02 - Urals
RU +5500+07324 Asia/Omsk Moscow+03 - west Siberia
RU +5502+08255 Asia/Novosibirsk Moscow+03 - Novosibirsk
@@ -398,7 +400,6 @@ TZ -0648+03917 Africa/Dar_es_Salaam
UA +5026+03031 Europe/Kiev most locations
UA +4837+02218 Europe/Uzhgorod Ruthenia
UA +4750+03510 Europe/Zaporozhye Zaporozh'ye, E Lugansk / Zaporizhia, E Luhansk
-UA +4457+03406 Europe/Simferopol central Crimea
UG +0019+03225 Africa/Kampala
UM +1645-16931 Pacific/Johnston Johnston Atoll
UM +2813-17722 Pacific/Midway Midway Islands