Module Name: src
Committed By: christos
Date: Tue Jan 1 03:04:56 UTC 2019
Modified Files:
src/lib/libc/time: Makefile NEWS localtime.c theory.html tz-art.html
tz-link.html version zdump.c zic.c
Log Message:
Release 2018i - 2018-12-30 11:05:43 -0800
Briefly:
São Tomé and Príncipe switches from +01 to +00 on 2019-01-01.
Changes to future timestamps
Due to a change in government, São Tomé and Príncipe switches back
from +01 to +00 on 2019-01-01 at 02:00. (Thanks to Vadim
Nasardinov and Michael Deckers.)
Release 2018h - 2018-12-23 17:59:32 -0800
Briefly:
Qyzylorda, Kazakhstan moved from +06 to +05 on 2018-12-21.
New zone Asia/Qostanay because Qostanay, Kazakhstan didn't move.
Metlakatla, Alaska observes PST this winter only.
Guess Morocco will continue to adjust clocks around Ramadan.
Add predictions for Iran from 2038 through 2090.
Changes to future timestamps
Guess that Morocco will continue to fall back just before and
spring forward just after Ramadan, the practice since 2012.
(Thanks to Maamar Abdelkader.) This means Morocco will observe
negative DST during Ramadan in main and vanguard formats, and in
rearguard format it stays in the +00 timezone and observes
ordinary DST in all months other than Ramadan. As before, extend
this guesswork to the year 2037. As a consequence, Morocco is
scheduled to observe three DST transitions in some Gregorian years
(e.g., 2033) due to the mismatch between the Gregorian and Islamic
calendars.
The table of exact transitions for Iranian DST has been extended.
It formerly cut off before the year 2038 in a nod to 32-bit time_t.
It now cuts off before 2091 as there is doubt about how the Persian
calendar will treat 2091. This change predicts DST transitions in
2038-9, 2042-3, and 2046-7 to occur one day later than previously
predicted. As before, post-cutoff transitions are approximated.
Changes to past and future timestamps
Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
+05 on 2018-12-21. This is a zone split as Qostanay (aka
Kostanay) did not switch, so create a zone Asia/Qostanay.
Metlakatla moved from Alaska to Pacific standard time on 2018-11-04.
It did not change clocks that day and remains on -08 this winter.
(Thanks to Ryan Stanley.) It will revert to the usual Alaska
rules next spring, so this change affects only timestamps
from 2018-11-04 through 2019-03-10.
Change to past timestamps
Kwajalein's 1993-08-20 transition from -12 to +12 was at 24:00,
not 00:00. I transcribed the time incorrectly from Shanks.
(Thanks to Phake Nick.)
Nauru's 1979 transition was on 02-10 at 02:00, not 05-01 at 00:00.
(Thanks to Phake Nick.)
Guam observed DST irregularly from 1959 through 1977.
(Thanks to Phake Nick.)
Hong Kong observed DST in 1941 starting 06-15 (not 04-01), then on
10-01 changed standard time to +08:30 (not +08). Its transition
back to +08 after WWII was on 1945-09-15, not the previous day.
Its 1904-10-30 change took effect at 01:00 +08 (not 00:00 LMT).
(Thanks to Phake Nick, Steve Allen, and Joseph Myers.) Also,
its 1952 fallback was on 11-02 (not 10-25).
This release contains many changes to timestamps before 1946 due
to Japanese possession or occupation of Pacific/Chuuk,
Pacific/Guam, Pacific/Kosrae, Pacific/Kwajalein, Pacific/Majuro,
Pacific/Nauru, Pacific/Palau, and Pacific/Pohnpei.
(Thanks to Phake Nick.)
Assume that the Spanish East Indies was like the Philippines and
observed American time until the end of 1844. This affects
Pacific/Chuuk, Pacific/Kosrae, Pacific/Palau, and Pacific/Pohnpei.
Changes to past tm_isdst flags
For the recent Morocco change, the tm_isdst flag should be 1 from
2018-10-27 00:00 to 2018-10-28 03:00. (Thanks to Michael Deckers.)
Give a URL to the official decree. (Thanks to Matt Johnson.)
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/lib/libc/time/Makefile
cvs rdiff -u -r1.26 -r1.27 src/lib/libc/time/NEWS
cvs rdiff -u -r1.113 -r1.114 src/lib/libc/time/localtime.c
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/time/theory.html
cvs rdiff -u -r1.2 -r1.3 src/lib/libc/time/tz-art.html
cvs rdiff -u -r1.3 -r1.4 src/lib/libc/time/tz-link.html
cvs rdiff -u -r1.9 -r1.10 src/lib/libc/time/version
cvs rdiff -u -r1.50 -r1.51 src/lib/libc/time/zdump.c
cvs rdiff -u -r1.72 -r1.73 src/lib/libc/time/zic.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/time/Makefile
diff -u src/lib/libc/time/Makefile:1.41 src/lib/libc/time/Makefile:1.42
--- src/lib/libc/time/Makefile:1.41 Fri Oct 19 19:05:35 2018
+++ src/lib/libc/time/Makefile Mon Dec 31 22:04:56 2018
@@ -380,15 +380,18 @@ AWK= awk
# is typically nicer if it works.
KSHELL= /bin/bash
+# Name of curl <https://curl.haxx.se/>, used for HTML validation.
+CURL= curl
+
# The path where SGML DTDs are kept and the catalog file(s) to use when
-# validating. The default should work on both Debian and Red Hat.
+# validating HTML 4.01. The default should work on both Debian and Red Hat.
SGML_TOPDIR= /usr
SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
SGML_CATALOG_FILES= \
$(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
-# The name, arguments and environment of a program to validate your web pages.
+# The name, arguments and environment of a program to validate HTML 4.01.
# See <http://openjade.sourceforge.net/doc/> for a validator, and
# <https://validator.w3.org/source/> for a validation library.
# Set VALIDATE=':' if you do not have such a program.
@@ -488,6 +491,7 @@ MANTXTS= newctime.3.txt newstrftime.3.tx
COMMON= calendars CONTRIBUTING LICENSE Makefile \
NEWS README theory.html version
WEB_PAGES= tz-art.html tz-how-to.html tz-link.html
+CHECK_WEB_PAGES=check_tz-art.html check_tz-how-to.html check_tz-link.html
DOCS= $(MANS) date.1 $(MANTXTS) $(WEB_PAGES)
PRIMARY_YDATA= africa antarctica asia australasia \
europe northamerica southamerica
@@ -799,9 +803,15 @@ check_tzs: $(TZS) $(TZS_NEW)
fi
touch $@
-# This checks only the HTML 4.01 strict page.
-# To check the the other pages, use <https://validator.w3.org/>.
-check_web: tz-how-to.html
+check_web: $(CHECK_WEB_PAGES)
+check_tz-art.html: tz-art.html
+check_tz-link.html: tz-link.html
+check_tz-art.html check_tz-link.html:
+ $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
+ -F file=@$$(expr $@ : 'check_\(.*\)') -o [email protected] && \
+ test ! -s [email protected] || { cat [email protected]; exit 1; }
+ mv [email protected] $@
+check_tz-how-to.html: tz-how-to.html
$(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html
touch $@
@@ -1068,7 +1078,7 @@ zic.o: private.h tzfile.h version.h
.PHONY: ALL INSTALL all
.PHONY: check check_time_t_alternatives
-.PHONY: check_zishrink
+.PHONY: check_web check_zishrink
.PHONY: clean clean_misc dummy.zd force_tzs
.PHONY: install install_data maintainer-clean names
.PHONY: posix_only posix_packrat posix_right public
Index: src/lib/libc/time/NEWS
diff -u src/lib/libc/time/NEWS:1.26 src/lib/libc/time/NEWS:1.27
--- src/lib/libc/time/NEWS:1.26 Sat Oct 27 18:29:24 2018
+++ src/lib/libc/time/NEWS Mon Dec 31 22:04:56 2018
@@ -1,14 +1,103 @@
News for the tz database
+Release 2018i - 2018-12-30 11:05:43 -0800
+
+ Briefly:
+ São Tomé and Príncipe switches from +01 to +00 on 2019-01-01.
+
+ Changes to future timestamps
+
+ Due to a change in government, São Tomé and Príncipe switches back
+ from +01 to +00 on 2019-01-01 at 02:00. (Thanks to Vadim
+ Nasardinov and Michael Deckers.)
+
+
+Release 2018h - 2018-12-23 17:59:32 -0800
+
+ Briefly:
+ Qyzylorda, Kazakhstan moved from +06 to +05 on 2018-12-21.
+ New zone Asia/Qostanay because Qostanay, Kazakhstan didn't move.
+ Metlakatla, Alaska observes PST this winter only.
+ Guess Morocco will continue to adjust clocks around Ramadan.
+ Add predictions for Iran from 2038 through 2090.
+
+ Changes to future timestamps
+
+ Guess that Morocco will continue to fall back just before and
+ spring forward just after Ramadan, the practice since 2012.
+ (Thanks to Maamar Abdelkader.) This means Morocco will observe
+ negative DST during Ramadan in main and vanguard formats, and in
+ rearguard format it stays in the +00 timezone and observes
+ ordinary DST in all months other than Ramadan. As before, extend
+ this guesswork to the year 2037. As a consequence, Morocco is
+ scheduled to observe three DST transitions in some Gregorian years
+ (e.g., 2033) due to the mismatch between the Gregorian and Islamic
+ calendars.
+
+ The table of exact transitions for Iranian DST has been extended.
+ It formerly cut off before the year 2038 in a nod to 32-bit time_t.
+ It now cuts off before 2091 as there is doubt about how the Persian
+ calendar will treat 2091. This change predicts DST transitions in
+ 2038-9, 2042-3, and 2046-7 to occur one day later than previously
+ predicted. As before, post-cutoff transitions are approximated.
+
+ Changes to past and future timestamps
+
+ Qyzylorda (aka Kyzylorda) oblast in Kazakhstan moved from +06 to
+ +05 on 2018-12-21. This is a zone split as Qostanay (aka
+ Kostanay) did not switch, so create a zone Asia/Qostanay.
+
+ Metlakatla moved from Alaska to Pacific standard time on 2018-11-04.
+ It did not change clocks that day and remains on -08 this winter.
+ (Thanks to Ryan Stanley.) It will revert to the usual Alaska
+ rules next spring, so this change affects only timestamps
+ from 2018-11-04 through 2019-03-10.
+
+ Change to past timestamps
+
+ Kwajalein's 1993-08-20 transition from -12 to +12 was at 24:00,
+ not 00:00. I transcribed the time incorrectly from Shanks.
+ (Thanks to Phake Nick.)
+
+ Nauru's 1979 transition was on 02-10 at 02:00, not 05-01 at 00:00.
+ (Thanks to Phake Nick.)
+
+ Guam observed DST irregularly from 1959 through 1977.
+ (Thanks to Phake Nick.)
+
+ Hong Kong observed DST in 1941 starting 06-15 (not 04-01), then on
+ 10-01 changed standard time to +08:30 (not +08). Its transition
+ back to +08 after WWII was on 1945-09-15, not the previous day.
+ Its 1904-10-30 change took effect at 01:00 +08 (not 00:00 LMT).
+ (Thanks to Phake Nick, Steve Allen, and Joseph Myers.) Also,
+ its 1952 fallback was on 11-02 (not 10-25).
+
+ This release contains many changes to timestamps before 1946 due
+ to Japanese possession or occupation of Pacific/Chuuk,
+ Pacific/Guam, Pacific/Kosrae, Pacific/Kwajalein, Pacific/Majuro,
+ Pacific/Nauru, Pacific/Palau, and Pacific/Pohnpei.
+ (Thanks to Phake Nick.)
+
+ Assume that the Spanish East Indies was like the Philippines and
+ observed American time until the end of 1844. This affects
+ Pacific/Chuuk, Pacific/Kosrae, Pacific/Palau, and Pacific/Pohnpei.
+
+ Changes to past tm_isdst flags
+
+ For the recent Morocco change, the tm_isdst flag should be 1 from
+ 2018-10-27 00:00 to 2018-10-28 03:00. (Thanks to Michael Deckers.)
+ Give a URL to the official decree. (Thanks to Matt Johnson.)
+
+
Release 2018g - 2018-10-26 22:22:45 -0700
Briefly:
- Morocco switches to permanent +01 on 2018-10-27.
+ Morocco switches to permanent +01 on 2018-10-28.
Changes to future timestamps
- Morocco switches from +00/+01 to permanent +01 effective 2018-10-27,
- so its clocks will not fall back on 2018-10-28 as previously scheduled.
+ Morocco switches from +00/+01 to permanent +01 effective 2018-10-28,
+ so its clocks will not fall back as previously scheduled.
(Thanks to Mohamed Essedik Najd and Brian Inglis.)
Changes to code
@@ -119,7 +208,7 @@ Release 2018f - 2018-10-18 00:14:18 -070
localtime.c no longer ignores TZif POSIX-style TZ strings that
specify only standard time. Instead, these TZ strings now
override the default time type for timestamps after the last
- transition (or for all time stamps if there are no transitions),
+ transition (or for all timestamps if there are no transitions),
just as DST strings specifying DST have always done.
leapseconds.awk now outputs "#updated" and "#expires" comments,
Index: src/lib/libc/time/localtime.c
diff -u src/lib/libc/time/localtime.c:1.113 src/lib/libc/time/localtime.c:1.114
--- src/lib/libc/time/localtime.c:1.113 Fri Oct 19 19:05:35 2018
+++ src/lib/libc/time/localtime.c Mon Dec 31 22:04:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: localtime.c,v 1.113 2018/10/19 23:05:35 christos Exp $ */
+/* $NetBSD: localtime.c,v 1.114 2019/01/01 03:04:56 christos Exp $ */
/* Convert timestamp from time_t to struct tm. */
@@ -12,7 +12,7 @@
#if 0
static char elsieid[] = "@(#)localtime.c 8.17";
#else
-__RCSID("$NetBSD: localtime.c,v 1.113 2018/10/19 23:05:35 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.114 2019/01/01 03:04:56 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -461,6 +461,7 @@ tzloadbody(char const *name, struct stat
doaccess = name[0] == '/';
#endif
if (!doaccess) {
+ char const *dot;
size_t namelen = strlen(name);
if (sizeof lsp->fullname - sizeof tzdirslash <= namelen)
return ENAMETOOLONG;
@@ -471,9 +472,16 @@ tzloadbody(char const *name, struct stat
memcpy(lsp->fullname, tzdirslash, sizeof tzdirslash);
strcpy(lsp->fullname + sizeof tzdirslash, name);
- /* Set doaccess if '.' (as in "../") shows up in name. */
- if (strchr(name, '.'))
- doaccess = true;
+ /* Set doaccess if NAME contains a ".." file name
+ component, as such a name could read a file outside
+ the TZDIR virtual subtree. */
+ for (dot = name; (dot = strchr(dot, '.')); dot++)
+ if ((dot == name || dot[-1] == '/') && dot[1] == '.'
+ && (dot[2] == '/' || !dot[2])) {
+ doaccess = true;
+ break;
+ }
+
name = lsp->fullname;
}
if (doaccess && access(name, R_OK) != 0)
@@ -829,7 +837,7 @@ static const int year_lengths[2] = {
** Return a pointer to that character.
*/
-static const char *
+static ATTRIBUTE_PURE const char *
getzname(const char *strp)
{
char c;
@@ -850,7 +858,7 @@ getzname(const char *strp)
** We don't do any checking here; checking is done later in common-case code.
*/
-static const char *
+static ATTRIBUTE_PURE const char *
getqzname(const char *strp, const int delim)
{
int c;
Index: src/lib/libc/time/theory.html
diff -u src/lib/libc/time/theory.html:1.5 src/lib/libc/time/theory.html:1.6
--- src/lib/libc/time/theory.html:1.5 Sat Oct 27 18:29:24 2018
+++ src/lib/libc/time/theory.html Mon Dec 31 22:04:56 2018
@@ -406,7 +406,7 @@ in decreasing order of importance:
EAT East Africa,
EST/EDT/EWT/EPT/EDDT Eastern [North America],
EET/EEST Eastern European,
- GST Guam,
+ GST/GDT Guam,
HST/HDT/HWT/HPT Hawaii,
HKT/HKST Hong Kong,
IST India,
@@ -1238,7 +1238,7 @@ Some people's work schedules
use <a href="https://en.wikipedia.org/wiki/Timekeeping_on_Mars">Mars time</a>.
Jet Propulsion Laboratory (JPL) coordinators kept Mars time on
and off during the
-<a href="https://en.wikipedia.org/wiki/Mars_Pathfinder#End_of_mission">Mars
+<a href="https://en.wikipedia.org/wiki/Mars_Pathfinder">Mars
Pathfinder</a> mission.
Some of their family members also adapted to Mars time.
Dozens of special Mars watches were built for JPL workers who kept
@@ -1261,8 +1261,7 @@ meridian</a> of Mars goes through the ce
honor of the British astronomer who built the Greenwich telescope that
defines Earth's prime meridian.
Mean solar time on the Mars prime meridian is
-called <a href="https://en.wikipedia.org/wiki/Mars_Coordinated_Time">Mars
-Coordinated Time (<abbr>MTC</abbr>)</a>.
+called Mars Coordinated Time (<abbr>MTC</abbr>).
</p>
<p>
Index: src/lib/libc/time/tz-art.html
diff -u src/lib/libc/time/tz-art.html:1.2 src/lib/libc/time/tz-art.html:1.3
--- src/lib/libc/time/tz-art.html:1.2 Fri Oct 19 19:05:35 2018
+++ src/lib/libc/time/tz-art.html Mon Dec 31 22:04:56 2018
@@ -36,19 +36,15 @@ there is a reference to British Double S
The time does not play a large part in the plot;
it's just a passing reference to the time when one of the
characters was supposed to have died (but didn't).
-The IMDb page is at
-<a href="http://us.imdb.com/title/tt0038733/">
-http://us.imdb.com/title/tt0038733/
-</a>. (Dave Cantor)
+(<a href="http://us.imdb.com/title/tt0038733/">IMDb entry.</a>)
+(Dave Cantor)
<li>
The 1953 railway comedy movie <em>The Titfield Thunderbolt</em> includes a
play on words on British Double Summer Time. Valentine's wife wants
him to leave the pub and asks him, "Do you know what time it is?"
And he, happy where he is, replies: "Yes, my love. Summer double time."
-IMDb page:
-<a href="http://us.imdb.com/title/tt0046436/">
-http://us.imdb.com/title/tt0046436/
-</a>. (Mark Brader, 2009-10-02)
+(<a href="http://us.imdb.com/title/tt0046436/">IMDb entry.</a>)
+(Mark Brader, 2009-10-02)
</li>
<li>
The premise of the 1999 caper movie <em>Entrapment</em> involves computers
@@ -60,10 +56,8 @@ a gigantic computerized theft. To achiev
crooks interfere with the microwave system supplying time signals to
the computer, advancing the time by 0.1 second each minute over the
last hour of 1999. (So this movie teaches us that 0.1 × 60 = 10.)
-IMDb page:
-<a href="http://us.imdb.com/title/tt0137494/">
-http://us.imdb.com/title/tt0137494/
-</a>. (Mark Brader, 2009-10-02)
+(<a href="http://us.imdb.com/title/tt0137494/">IMDb entry.</a>)
+(Mark Brader, 2009-10-02)
</li>
<li>
One mustn't forget the
@@ -79,12 +73,15 @@ Cube," first aired 1958-02-24, had Super
of the Arlington Time Signal to broadcast ahead of actual time;
doing so got a crook trying to be declared dead to
emerge a bit too early from the titular enclosure.
+(<a href="https://www.imdb.com/title/tt0506628/">IMDb entry</a>.)
</li>
<li>
-"The Chimes of Big Ben", <em>The Prisoner</em>, episode 2, ITC, 1967-10-06.
+"<a href="https://en.wikipedia.org/wiki/The_Chimes_of_Big_Ben">The Chimes
+of Big Ben</a>", <em>The Prisoner</em>, episode 2, ITC, 1967-10-06.
Our protagonist tumbles to
the fraudulent nature of a Poland-to-England escape upon hearing "Big
Ben" chiming on Polish local time.
+(<a href="https://www.imdb.com/title/tt0679185/">IMDb entry.</a>)
</li>
<li>
"The Susie", <em>Seinfeld</em>, season 8, episode 15, NBC, 1997-02-13.
@@ -196,7 +193,9 @@ Nick Enright, <em>Daylight Saving</em>,
A fast-paced comedy about love and loneliness as the clocks turn back.
</li>
<li>
-Umberto Eco, <em>The Island of the Day Before</em>
+Umberto Eco,
+<a href="https://en.wikipedia.org/wiki/The_Island_of_the_Day_Before"><em>The
+Island of the Day Before</em></a>
(<em>L'isola del giorno prima</em>), 1994.
"...the story of a 17th century Italian nobleman trapped near an island
on the International Date Line. Time and time zones play an integral
Index: src/lib/libc/time/tz-link.html
diff -u src/lib/libc/time/tz-link.html:1.3 src/lib/libc/time/tz-link.html:1.4
--- src/lib/libc/time/tz-link.html:1.3 Sat Oct 27 18:29:24 2018
+++ src/lib/libc/time/tz-link.html Mon Dec 31 22:04:56 2018
@@ -189,8 +189,8 @@ href="http://userguide.icu-project.org/d
title="International Components for Unicode">ICU</abbr></a>,
<a href="https://developer.ibm.com/javasdk/support/dst/jtzu/"><abbr>IBM</abbr></a>
and <a
-href="http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html">Oracle</a>
-Java, <a href="http://www.joda.org/joda-time/tz_update.html">Joda-Time</a>, <a
+href="https://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html">Oracle</a>
+Java, <a href="https://www.joda.org/joda-time/tz_update.html">Joda-Time</a>, <a
href="https://dev.mysql.com/doc/refman/en/time-zone-support.html">MySQL</a>,
and <a
href="https://nodatime.org/userguide/tzdb">Noda Time</a> (see below).
@@ -318,11 +318,12 @@ database conversion utility</a> is like
href="https://www.microsoft.com/net">.NET framework</a>
and with a <abbr>BSD</abbr>-style license.</li>
<li><a
-href="http://search.cpan.org/dist/DateTime-TimeZone/">DateTime::TimeZone</a>
+href="https://metacpan.org/release/DateTime-TimeZone">DateTime::TimeZone</a>
contains a script <code>parse_olson</code> that compiles
<code><abbr>tz</abbr></code> source into <a href="https://www.perl.org">Perl</a>
modules. It is part of the Perl <a
-href="http://datetime.perl.org">DateTime Project</a>, which is freely
+href="https://github.com/houseabsolute/DateTime.pm/wiki">DateTime Project</a>,
+which is freely
available under both the <abbr>GPL</abbr> and the Perl Artistic
License. DateTime::TimeZone also contains a script
<code>tests_from_zdump</code> that generates test cases for each clock
@@ -357,25 +358,28 @@ freely available under the <abbr>MIT</ab
<li>Java-based compilers and libraries include:
<ul>
<li>The <a
-href="http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html">TZUpdater
+href="https://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html">TZUpdater
tool</a> compiles <code><abbr>tz</abbr></code> source into the format used by
Oracle Java.</li>
<li>The <a
-href="http://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html">Java
-8 <code>java.time</code> <abbr>API</abbr></a> can be supplemented by <a
-href="http://www.threeten.org/threeten-extra/">ThreeTen-Extra</a>,
+href="https://www.oracle.com/technetwork/articles/java/jf14-date-time-2125367.html">Java
+SE <code>java.time</code> <abbr>API</abbr></a> in Java 8 and later
+can be supplemented by <a
+href="https://www.threeten.org/threeten-extra/">ThreeTen-Extra</a>,
which is freely available under a <abbr>BSD</abbr>-style license.</li>
-<li><a href="http://www.joda.org/joda-time/">Joda-Time – Java date
+<li><a href="https://www.joda.org/joda-time/">Joda-Time – Java date
and time <abbr>API</abbr></a> contains a class
<code>org.joda.time.tz.ZoneInfoCompiler</code> that compiles
<code><abbr>tz</abbr></code> source into a binary format. It inspired
Java 8 <code>java.time</code>, which its users should migrate to once
they can assume Java 8 or later. It is available under the <a
href="https://www.apache.org/licenses/LICENSE-2.0">Apache License</a>.</li>
-<li><a href="https://github.com/MenoData/Time4J/">Time4J –
-Advanced date, time and interval library for Java</a> contains a class
-<code>net.time4j.tool.TimezoneRepositoryCompiler</code> that compiles
-<code><abbr>tz</abbr></code> source into a binary format. Time4J is
+<li><a href="https://github.com/MenoData/Time4A">Time4A: Advanced date and
+time library for Android</a> and
+<a href="https://github.com/MenoData/Time4J/">Time4J: Advanced date,
+time and interval library for Java</a> compile
+<code><abbr>tz</abbr></code> source into a binary format.
+Time4A is available under the Apache License and Time4J is
available under the <a
href="https://www.gnu.org/copyleft/lesser.html"><abbr>GNU</abbr> Lesser
General Public License (<abbr title="Lesser General Public
@@ -385,11 +389,8 @@ Java-based libraries.</li>
</ul>
<li><a href="https://nodatime.org">Noda Time – Date and
time <abbr>API</abbr> for .NET</a>
-and <a href="http://www.babiej.demon.nl/Tz4Net/main.htm">TZ4Net</a>
-are similar to Joda-Time and Time4J, but for the .NET framework instead of
-Java. They are freely available under the
-Apache License
-and a <abbr>BSD</abbr>-style license, respectively.</li>
+is like Joda-Time and Time4J, but for the .NET framework instead of Java.
+It is freely available under the Apache License.</li>
<li><a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a>-based
compilers and libraries include:
<ul>
@@ -483,7 +484,7 @@ JavaScript library that supports date ar
aware. It is freely available under the <abbr>MIT</abbr> license.</li>
<li>Tcl, mentioned <a href="#Tcl">above</a>, also contains a
<abbr>TZif</abbr> file reader.</li>
-<li><a href="http://search.cpan.org/perldoc?DateTime::TimeZone::Tzfile">
+<li><a href="https://metacpan.org/pod/DateTime::TimeZone::Tzfile">
DateTime::TimeZone::Tzfile</a>
is a <abbr>TZif</abbr> file reader written in Perl.
It is freely available under the same terms as Perl
@@ -550,8 +551,8 @@ Java</a> contains a copy of a subset of
Java-specific format.</li>
<li><a href="https://relativedata.com/page/Time-Zone-Master">Time Zone
Master</a> is a Microsoft Windows clock program that can automatically
-download, compile and use <code>tz</code> releases. The Basic version
-is free.</li>
+download, compile and use <code><abbr>tz</abbr></code> releases.
+The Basic version is free.</li>
<li><a
href="http://veladg.com/velaterra.html">VelaTerra</a> is
a macOS program. Its developers
@@ -561,11 +562,17 @@ licenses</a> to <code><abbr>tz</abbr></c
<h2 id="other-dbs">Other time zone databases</h2>
<ul>
<li><a href="https://www.astro.com/atlas">Time-zone Atlas</a>
-is Astrodienst's Web version of Shanks and Pottenger's
-time zone history atlases also published in <a
+is Astrodienst's Web version of Shanks and Pottenger's out-of-print
+time zone history atlases
+<a href="https://www.worldcat.org/oclc/468828649">for the US</a> and
+<a href="https://www.worldcat.org/oclc/76950459">for the world</a>,
+now published in <a
href="https://astrocom.com/astrology-products/software/acs-atlas-software">software</a>
form by <a href="https://astrocom.com">ACS-Starcrafts</a>.
-These atlases are extensive but unreliable, as Shanks appears to have
+Although these extensive atlases
+<a href="https://astrologynewsservice.com/opinion/how-astrologers-contributed-to-the-information-age-a-brief-history-of-time/">were
+sources for much of the older <code><abbr>tz</abbr></code> data</a>,
+they are unreliable as Shanks appears to have
guessed many <abbr>UT</abbr> offsets and transitions. The atlases cite no
sources and do not indicate which entries are guesswork.</li>
<li><a href="https://en.wikipedia.org/wiki/HP-UX">HP-UX</a> has a database in
@@ -612,8 +619,6 @@ where the two differ greatly. It's a bit
from several <a href="https://en.wikipedia.org/wiki/Geolocation">geolocation</a>
services and other sources.</p>
<ul>
-<li>Databases of time zone boundaries include:
-<ul>
<li><a href="https://github.com/evansiroky/timezone-boundary-builder">Timezone
Boundary Builder</a> extracts
<a href="https://www.openstreetmap.org">Open Street Map</a> data to build
@@ -622,21 +627,6 @@ Its code is freely available under the <
its data entries are freely available under the
<a href="https://opendatacommons.org/licenses/odbl/">Open Data Commons
Open Database License</a>. The maps' borders appear to be quite accurate.</li>
-<li><a href="http://efele.net/maps/tz/"><abbr>TZ</abbr> timezones
-maps</a> contains <a
-href="https://en.wikipedia.org/wiki/Shapefile">shapefiles</a> of
-sets of <code><abbr>tzdb</abbr></code> timezones. This includes
-<a href="http://efele.net/maps/tz/world/">tz_world</a>, a shapefile
-for all the world's timezones. These maps are no longer maintained and
-are superseded by the Timezone Boundary Builder.</li>
-<li><a
-href="https://github.com/straup/whereonearth-timezone">Whereonearth-timezone</a>
-is in <a href="https://tools.ietf.org/html/rfc7946">GeoJSON</a> format
-(Internet <abbr>RFC</abbr> 7946), and combines the
-the tz_world shapefiles with the
-<a href="https://developer.yahoo.com/geo/geoplanet/">GeoPlanet</a>
-dataset.</li>
-</ul></li>
<li>Programmatic interfaces that map geographical coordinates via tz_world to
<code><abbr>tzdb</abbr></code> timezones include:
<ul>
@@ -661,13 +651,13 @@ library for Python is freely available u
<li>The <a
href="https://github.com/gunyarakun/timezone_finder">timezone_finder</a>
library for Ruby is freely available under the MIT license.</li>
-<li><a href="https://derickrethans.nl/what-time-is-it.html">What Time
-is It Here?</a> applies MongoDB
-geospatial query operators to shapefiles' data.</li>
</ul></li>
<li>Free access via a network API, if you register a key, is provided by
-the <a href="http://www.geonames.org/export/web-services.html#timezone">GeoNames Timezone web service</a>,
-the <a href="https://developers.google.com/maps/documentation/timezone/intro">Google Maps Time Zone API</a>, and
+the <a
+href="https://www.geonames.org/export/web-services.html#timezone">GeoNames
+Timezone web service</a>, the <a
+href="https://developers.google.com/maps/documentation/timezone/intro">Google
+Maps Time Zone API</a>, and
the <a href="https://timezonedb.com">Time Zone Database & API</a>.
Commercial network API access is provided
by <a href="https://askgeo.com">AskGeo</a>
@@ -703,15 +693,16 @@ common.</li>
<li><a href="https://www.nist.gov/pml/time-and-frequency-division/popular-links/walk-through-time">A
Walk through Time</a>
surveys the evolution of timekeeping.</li>
-<li><a href="http://www.webexhibits.org/daylightsaving/">About Daylight
-Saving Time – History, rationale, laws & dates</a>
-is an overall history of <abbr>DST</abbr>.</li>
+<li>The history of daylight saving time is surveyed in <a
+href="http://www.webexhibits.org/daylightsaving/">About Daylight
+Saving Time – History, rationale, laws & dates</a> and summarized in
+<a href="http://seizethedaylight.com/dst/">A Brief
+History of Daylight Saving Time</a>.</li>
+<li><a href="https://www.laphamsquarterly.org/roundtable/time-lords">Time
+Lords</a> discusses how authoritarians manipulate civil time.</li>
<li><a href="https://www.w3.org/TR/timezone/">Working with Time Zones</a>
contains guidelines and best practices for software applications that
deal with civil time.</li>
-<li><a href="http://seizethedaylight.com/dst/">A Brief
-History of Daylight Saving Time</a> summarizes some of the contentious
-history of <abbr>DST</abbr>.</li>
<li><a href="https://www.staff.science.uu.nl/~gent0113/idl/idl.htm">A History of
the International Date Line</a> tells the story of the most important
time zone boundary.</li>
@@ -729,7 +720,7 @@ href="http://www.bom.gov.au/climate/aver
Dates of Daylight Savings Time within Australia</a>.</dd>
<dt>Belgium</dt>
<dd>The Royal Observatory of Belgium maintains a table of <a
-href="http://www.astro.oma.be/GENERAL/INFO/nli001a.html"
+href="https://www.astro.oma.be/GENERAL/INFO/nli001a.html"
hreflang="nl">time in Belgium (in Dutch)</a>.</dd>
<dt>Brazil</dt>
<dd>The Time Service Department of the National Observatory
@@ -743,7 +734,7 @@ href="https://www.nrc-cnrc.gc.ca/eng/ser
zones & daylight saving time</a>.</dd>
<dt>Chile</dt>
<dd>The Hydrographic and Oceanographic Service of the Chilean Navy publishes a
-<a href="http://www.horaoficial.cl/historia_hora.html" hreflang="es">history of
+<a href="https://www.horaoficial.cl/historia_hora.html" hreflang="es">history of
Chile's official time (in Spanish)</a>.</dd>
<dt>China</dt>
<dd>The Hong Kong Observatory maintains a
@@ -767,8 +758,8 @@ href="ftp://ftp.cs.huji.ac.il/pub/tz/ann
hreflang="he">announcements (in Hebrew)</a>.</dd>
<dt>Italy</dt>
<dd>The National Institute of Metrological Research maintains a
-<a href="http://oldsite.inrim.it/res/tf/ora_legale_i.shtml">table of civil time
-(in Italian)</a>.</dd>
+<a href="http://oldsite.inrim.it/res/tf/ora_legale_i.shtml" hreflang="it">table
+of civil time (in Italian)</a>.</dd>
<dt>Malaysia</dt>
<dd>See Singapore <a href="#Singapore">below</a>.</dd>
<dt>Mexico</dt>
@@ -871,14 +862,14 @@ href="https://www.iers.org/IERS/EN/Publi
title="International Earth Rotation and Reference Systems Service">IERS</abbr>
Bulletins</a> contains official publications of the International
Earth Rotation and Reference Systems Service, which decides when leap
-seconds occur. The <code>tz</code> code and data support leap seconds
+seconds occur. The <code><abbr>tz</abbr></code> code and data support leap seconds
via an optional "<code>right</code>" configuration, as opposed to the
default "<code>posix</code>" configuration.</li>
<li><a href="https://developers.google.com/time/smear">Leap Smear</a>
discusses how to gradually adjust <abbr>POSIX</abbr> clocks near a
leap second so that they disagree with <abbr>UTC</abbr> by at most a
half second, even though every <abbr>POSIX</abbr> minute has exactly
-sixty seconds. This approach works with the default <code>tz</code>
+sixty seconds. This approach works with the default <code><abbr>tz</abbr></code>
"<code>posix</code>" configuration, is <a
href="http://bk1.ntp.org/ntp-stable/README.leapsmear">supported</a> by
the <abbr>NTP</abbr> reference implementation, and is used by major
Index: src/lib/libc/time/version
diff -u src/lib/libc/time/version:1.9 src/lib/libc/time/version:1.10
--- src/lib/libc/time/version:1.9 Sat Oct 27 18:29:24 2018
+++ src/lib/libc/time/version Mon Dec 31 22:04:56 2018
@@ -1 +1 @@
-2018g
+2018i
Index: src/lib/libc/time/zdump.c
diff -u src/lib/libc/time/zdump.c:1.50 src/lib/libc/time/zdump.c:1.51
--- src/lib/libc/time/zdump.c:1.50 Fri Oct 19 19:05:35 2018
+++ src/lib/libc/time/zdump.c Mon Dec 31 22:04:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: zdump.c,v 1.50 2018/10/19 23:05:35 christos Exp $ */
+/* $NetBSD: zdump.c,v 1.51 2019/01/01 03:04:56 christos Exp $ */
/* Dump time zone data in a textual format. */
/*
@@ -8,7 +8,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: zdump.c,v 1.50 2018/10/19 23:05:35 christos Exp $");
+__RCSID("$NetBSD: zdump.c,v 1.51 2019/01/01 03:04:56 christos Exp $");
#endif /* !defined lint */
#ifndef NETBSD_INSPIRED
@@ -810,8 +810,10 @@ my_snprintf(char *s, size_t size, char c
arglen = strlen(arg);
} else {
n = vsprintf(buf, format, args);
- if (n < 0)
+ if (n < 0) {
+ va_end(args);
return n;
+ }
arg = buf;
arglen = n;
}
Index: src/lib/libc/time/zic.c
diff -u src/lib/libc/time/zic.c:1.72 src/lib/libc/time/zic.c:1.73
--- src/lib/libc/time/zic.c:1.72 Sat Oct 27 18:29:24 2018
+++ src/lib/libc/time/zic.c Mon Dec 31 22:04:56 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: zic.c,v 1.72 2018/10/27 22:29:24 christos Exp $ */
+/* $NetBSD: zic.c,v 1.73 2019/01/01 03:04:56 christos Exp $ */
/*
** This file is in the public domain, so clarified as of
** 2006-07-17 by Arthur David Olson.
@@ -10,7 +10,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: zic.c,v 1.72 2018/10/27 22:29:24 christos Exp $");
+__RCSID("$NetBSD: zic.c,v 1.73 2019/01/01 03:04:56 christos Exp $");
#endif /* !defined lint */
#include "private.h"
@@ -2780,7 +2780,7 @@ error(_("can't determine time zone abbre
if (attypes[i].at > lastat->at)
lastat = &attypes[i];
if (lastat->at < rpytime(&xr, max_year - 1)) {
- addtt(rpytime(&xr, max_year + 1), typecnt-1);
+ addtt(rpytime(&xr, max_year + 1), lastat->type);
attypes[timecnt - 1].dontmerge = true;
}
}
@@ -2999,7 +2999,7 @@ lowerit(char a)
}
/* case-insensitive equality */
-static bool
+static ATTRIBUTE_PURE bool
ciequal(const char *ap, const char *bp)
{
while (lowerit(*ap) == lowerit(*bp++))
@@ -3008,7 +3008,7 @@ ciequal(const char *ap, const char *bp)
return false;
}
-static bool
+static ATTRIBUTE_PURE bool
itsabbr(const char *abbr, const char *word)
{
if (lowerit(*abbr) != lowerit(*word))
@@ -3024,7 +3024,7 @@ itsabbr(const char *abbr, const char *wo
/* Return true if ABBR is an initial prefix of WORD, ignoring ASCII case. */
-static bool
+static ATTRIBUTE_PURE bool
ciprefix(char const *abbr, char const *word)
{
do