Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/time Welcome to tzcode-2022c
details: https://anonhg.NetBSD.org/src/rev/5d1f8a0f8ca4
branches: trunk
changeset: 369416:5d1f8a0f8ca4
user: christos <christos%NetBSD.org@localhost>
date: Tue Aug 16 11:07:40 2022 +0000
description:
Welcome to tzcode-2022c
Work around a bug in onetrueawk that broke commands like
'make traditional_tarballs' on FreeBSD, macOS, etc.
(Problem reported by Deborah Goldsmith.)
Add code to tzselect that uses experimental structured comments in
zone1970.tab to clarify whether Zones like Africa/Abidjan and
Europe/Istanbul cross continent or ocean boundaries.
(Inspired by a problem reported by Peter Krefting.)
Fix bug with 'zic -d /a/b/c' when /a is unwritable but the
directory /a/b already exists.
Remove zoneinfo2tdf.pl, as it was unused and triggered false
malware alarms on some email servers.
diffstat:
lib/libc/time/Makefile | 9 ++--
lib/libc/time/NEWS | 26 +++++++++++++-
lib/libc/time/ctime.3 | 9 ++--
lib/libc/time/private.h | 5 ++-
lib/libc/time/theory.html | 26 +++++++------
lib/libc/time/tz-art.html | 30 ++++++++--------
lib/libc/time/tz-link.html | 85 ++++++++++++++++++++++-----------------------
lib/libc/time/tzfile.5 | 6 +-
lib/libc/time/tzselect.8 | 8 ++-
lib/libc/time/tzselect.ksh | 56 +++++++++++++++++++++++------
lib/libc/time/version | 2 +-
lib/libc/time/zic.c | 13 ++++--
12 files changed, 171 insertions(+), 104 deletions(-)
diffs (truncated from 739 to 300 lines):
diff -r 1de09f119b0b -r 5d1f8a0f8ca4 lib/libc/time/Makefile
--- a/lib/libc/time/Makefile Tue Aug 16 10:56:21 2022 +0000
+++ b/lib/libc/time/Makefile Tue Aug 16 11:07:40 2022 +0000
@@ -298,8 +298,9 @@
# guess TM_GMTOFF from other macros; define NO_TM_GMTOFF to suppress this.
# Similarly, if your system has a "zone abbreviation" field, define
# -DTM_ZONE=tm_zone
-# and define NO_TM_ZONE to suppress any guessing. These two fields are not
-# required by POSIX, but are widely available on GNU/Linux and BSD systems.
+# and define NO_TM_ZONE to suppress any guessing. Although these two fields
+# not required by POSIX, a future version of POSIX is planned to require them
+# and they are widely available on GNU/Linux and BSD systems.
#
# The next batch of options control support for external variables
# exported by tzcode. In practice these variables are less useful
@@ -538,7 +539,7 @@
leapseconds $(ZONETABLES)
AWK_SCRIPTS= checklinks.awk checktab.awk leapseconds.awk \
ziguard.awk zishrink.awk
-MISC= $(AWK_SCRIPTS) zoneinfo2tdf.pl
+MISC= $(AWK_SCRIPTS)
TZS_YEAR= 2050
TZS_CUTOFF_FLAG= -c $(TZS_YEAR)
TZS= to$(TZS_YEAR).tzs
@@ -567,7 +568,7 @@
tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
workman.sh zdump.8 zdump.c zic.8 zic.c \
ziguard.awk zishrink.awk \
- zone.tab zone1970.tab zoneinfo2tdf.pl
+ zone.tab zone1970.tab
# And for the benefit of csh users on systems that assume the user
# shell should be used to handle commands in Makefiles. . .
diff -r 1de09f119b0b -r 5d1f8a0f8ca4 lib/libc/time/NEWS
--- a/lib/libc/time/NEWS Tue Aug 16 10:56:21 2022 +0000
+++ b/lib/libc/time/NEWS Tue Aug 16 11:07:40 2022 +0000
@@ -1,5 +1,29 @@
News for the tz database
+Release 2022c - 2022-08-15 17:47:18 -0700
+
+ Briefly:
+ Work around awk bug in FreeBSD, macOS, etc.
+ Improve tzselect on intercontinental Zones.
+
+ Changes to code
+
+ Work around a bug in onetrueawk that broke commands like
+ 'make traditional_tarballs' on FreeBSD, macOS, etc.
+ (Problem reported by Deborah Goldsmith.)
+
+ Add code to tzselect that uses experimental structured comments in
+ zone1970.tab to clarify whether Zones like Africa/Abidjan and
+ Europe/Istanbul cross continent or ocean boundaries.
+ (Inspired by a problem reported by Peter Krefting.)
+
+ Fix bug with 'zic -d /a/b/c' when /a is unwritable but the
+ directory /a/b already exists.
+
+ Remove zoneinfo2tdf.pl, as it was unused and triggered false
+ malware alarms on some email servers.
+
+
Release 2022b - 2022-08-10 15:38:32 -0700
Briefly:
@@ -83,7 +107,7 @@
zic no longer complains "can't determine time zone abbreviation to
use just after until time" when a transition to a new standard
- time occurs simultanously with the first DST fallback transition.
+ time occurs simultaneously with the first DST fallback transition.
Changes to build procedure
diff -r 1de09f119b0b -r 5d1f8a0f8ca4 lib/libc/time/ctime.3
--- a/lib/libc/time/ctime.3 Tue Aug 16 10:56:21 2022 +0000
+++ b/lib/libc/time/ctime.3 Tue Aug 16 11:07:40 2022 +0000
@@ -1,8 +1,8 @@
-.\" $NetBSD: ctime.3,v 1.62 2021/09/28 06:45:08 kim Exp $
+.\" $NetBSD: ctime.3,v 1.63 2022/08/16 11:07:40 christos Exp $
.\"
.\" XXX: License missing?
.\"
-.Dd September 2, 2019
+.Dd August 16, 2022
.Dt CTIME 3
.Os
.Sh NAME
@@ -358,8 +358,9 @@
created.
Similarly, the
.Va tzname
-variable is optional.
-There is no guarantee that these fields and this variable will
+variable is optional; also, there is no guarantee that
+.Dv tzname
+will
continue to exist in this form in future releases of this code.
.Sh RETURN VALUES
.Bl -bullet
diff -r 1de09f119b0b -r 5d1f8a0f8ca4 lib/libc/time/private.h
--- a/lib/libc/time/private.h Tue Aug 16 10:56:21 2022 +0000
+++ b/lib/libc/time/private.h Tue Aug 16 11:07:40 2022 +0000
@@ -1,6 +1,6 @@
/* Private header for tzdb code. */
-/* $NetBSD: private.h,v 1.59 2022/08/16 10:56:21 christos Exp $ */
+/* $NetBSD: private.h,v 1.60 2022/08/16 11:07:40 christos Exp $ */
#ifndef PRIVATE_H
#define PRIVATE_H
@@ -184,6 +184,9 @@
# define EINVAL ERANGE
#endif
+#ifndef ELOOP
+# define ELOOP EINVAL
+#endif
#ifndef ENAMETOOLONG
# define ENAMETOOLONG EINVAL
#endif
diff -r 1de09f119b0b -r 5d1f8a0f8ca4 lib/libc/time/theory.html
--- a/lib/libc/time/theory.html Tue Aug 16 10:56:21 2022 +0000
+++ b/lib/libc/time/theory.html Tue Aug 16 11:07:40 2022 +0000
@@ -122,7 +122,7 @@
locate the user on a timezone map or prioritize names that are
geographically close. For an example selection interface, see the
<code>tzselect</code> program in the <code><abbr>tz</abbr></code> code.
-The <a href="http://cldr.unicode.org">Unicode Common Locale Data
+The <a href="https://cldr.unicode.org">Unicode Common Locale Data
Repository</a> contains data that may be useful for other selection
interfaces; it maps timezone names like <code>Europe/Prague</code> to
locale-dependent strings like "Prague", "Praha", "Прага", and "布拉格".
@@ -571,7 +571,7 @@
locations while uninhabited.
The leading '<code>-</code>' is a flag that the <abbr>UT</abbr> offset is in
some sense undefined; this notation is derived
- from <a href="https://tools.ietf.org/html/rfc3339">Internet
+ from <a href="https://datatracker.ietf.org/doc/html/rfc3339">Internet
<abbr title="Request For Comments">RFC</abbr> 3339</a>.
</li>
</ul>
@@ -624,7 +624,7 @@
should be observed.
In her 2015 book
<cite><a
- href="http://www.hup.harvard.edu/catalog.php?isbn=9780674286146">The
+ href="https://www.hup.harvard.edu/catalog.php?isbn=9780674286146">The
Global Transformation of Time, 1870–1950</a></cite>,
Vanessa Ogle writes
"Outside of Europe and North America there was no system of time
@@ -810,7 +810,7 @@
See: Stephenson FR, Morrison LV, Hohenkerk CY.
<a href="https://dx.doi.org/10.1098/rspa.2016.0404">Measurement of
the Earth's rotation: 720 BC to AD 2015</a>.
- <cite>Proc Royal Soc A</cite>. 2016 Dec 7;472:20160404.
+ <cite>Proc Royal Soc A</cite>. 2016;472:20160404.
Also see: Espenak F. <a
href="https://eclipse.gsfc.nasa.gov/SEhelp/uncertainty2004.html">Uncertainty
in Delta T (ΔT)</a>.
@@ -1036,7 +1036,7 @@
and numeric data as described <a href="#POSIX">above</a>.
The file's format is <dfn><abbr>TZif</abbr></dfn>,
a timezone information format that contains binary data; see
- <a href="https://tools.ietf.org/html/8536">Internet
+ <a href="https://datatracker.ietf.org/doc/html/8536">Internet
<abbr>RFC</abbr> 8536</a>.
The daylight saving time rules to be used for a
particular timezone are encoded in the
@@ -1064,11 +1064,12 @@
</li>
<li>
The code supports platforms with a <abbr>UT</abbr> offset member
- in <code>struct tm</code>, e.g., <code>tm_gmtoff</code>.
- </li>
- <li>
- The code supports platforms with a time zone abbreviation member in
- <code>struct tm</code>, e.g., <code>tm_zone</code>.
+ in <code>struct tm</code>, e.g., <code>tm_gmtoff</code>,
+ or with a time zone abbreviation member in
+ <code>struct tm</code>, e.g., <code>tm_zone</code>. As noted
+ in <a href="https://austingroupbugs.net/view.php?id=1533">Austin
+ Group defect 1533</a>, a future version of POSIX is planned to
+ require <code>tm_gmtoff</code> and <code>tm_zone</code>.
</li>
<li>
Functions <code>tzalloc</code>, <code>tzfree</code>,
@@ -1129,7 +1130,8 @@
<abbr>API</abbr>s.
Although it can still be used in arguments to
<code>mktime</code> to disambiguate timestamps near
- a <abbr>DST</abbr> transition when the clock jumps back, this
+ a <abbr>DST</abbr> transition when the clock jumps back on
+ platforms lacking <code>tm_gmtoff</code>, this
disambiguation does not work when standard time itself jumps back,
which can occur when a location changes to a time zone with a
lesser <abbr>UT</abbr> offset.
@@ -1277,7 +1279,7 @@
<a href="tz-link.html#precision">Precision timekeeping</a>,
and this package by default installs a <samp>leapseconds</samp> file
commonly used by
-<a href="http://www.ntp.org"><abbr title="Network Time Protocol">NTP</abbr></a>
+<a href="https://www.ntp.org"><abbr title="Network Time Protocol">NTP</abbr></a>
software that adjusts the kernel clock.
However, kernel-clock twiddling approximates UTC only roughly,
and systems needing more-precise UTC can use this package's leap
diff -r 1de09f119b0b -r 5d1f8a0f8ca4 lib/libc/time/tz-art.html
--- a/lib/libc/time/tz-art.html Tue Aug 16 10:56:21 2022 +0000
+++ b/lib/libc/time/tz-art.html Tue Aug 16 11:07:40 2022 +0000
@@ -483,19 +483,19 @@
<ul>
<li>
The webcomic <em>xkcd</em> has the strip
-"<a href='https://xkcd.com/673/'>The Sun</a>" (2009-12-09) and the panels
-"<a href='https://xkcd.com/1017/'>Backward in Time</a>" (2012-02-14),
-"<a href='https://xkcd.com/1061/'>EST</a>" (2012-05-28),
-"<a href='https://xkcd.com/1179/'>ISO 8601</a>" (2013-02-27),
-"<a href='https://xkcd.com/1335/'>Now</a>" (2014-02-26),
-"<a href='https://xkcd.com/1655/'>Doomsday Clock</a>" (2016-03-14),
-"<a href='https://xkcd.com/1799/'>Bad Map Projection: Time Zones</a>"
+"<a href="https://xkcd.com/673/">The Sun</a>" (2009-12-09) and the panels
+"<a href="https://xkcd.com/1017/">Backward in Time</a>" (2012-02-14),
+"<a href="https://xkcd.com/1061/">EST</a>" (2012-05-28),
+"<a href="https://xkcd.com/1179/">ISO 8601</a>" (2013-02-27),
+"<a href="https://xkcd.com/1335/">Now</a>" (2014-02-26),
+"<a href="https://xkcd.com/1655/">Doomsday Clock</a>" (2016-03-14),
+"<a href="https://xkcd.com/1799/">Bad Map Projection: Time Zones</a>"
(2017-02-15),
-"<a href='https://xkcd.com/1883/'>Supervillain Plan</a>" (2017-08-30),
-"<a href='https://xkcd.com/2050/'>6/6 Time</a>" (2018-09-24),
-and "<a href='https://xkcd.com/2266/'>Leap Smearing</a>" (2020-02-10).
+"<a href="https://xkcd.com/1883/">Supervillain Plan</a>" (2017-08-30),
+"<a href="https://xkcd.com/2050/">6/6 Time</a>" (2018-09-24),
+and "<a href="https://xkcd.com/2266/">Leap Smearing</a>" (2020-02-10).
The related book <em>What If?</em> has an entry
-"<a href='https://what-if.xkcd.com/26/'>Leap Seconds</a>" (2012-12-31).
+"<a href="https://what-if.xkcd.com/26/">Leap Seconds</a>" (2012-12-31).
</li>
<li>
Pig kills time in <a
@@ -504,11 +504,11 @@
</li>
<li>
Stonehenge is abandoned in <a
-href='https://www.gocomics.com/nonsequitur/2017/03/12'><em>Non Sequitur</em>
+href="https://www.gocomics.com/nonsequitur/2017/03/12"><em>Non Sequitur</em>
(2017-03-12)</a>.
<li>
The boss freaks out in <a
-href='https://dilbert.com/strip/1998-03-14'><em>Dilbert</em> (1998-03-14)</a>.
+href="https://dilbert.com/strip/1998-03-14"><em>Dilbert</em> (1998-03-14)</a>.
</li>
<li>
Peppermint Patty: "What if the world comes to an end tonight, Marcie?"
@@ -516,7 +516,7 @@
Marcie: "I promise there'll be a tomorrow, sir ... in fact,
it's already tomorrow in Australia!"
<br>
-(Charles M. Schulz, <a href='https://www.gocomics.com/peanuts/1980/06/13'><em>Peanuts</em>, 1980-06-13</a>)
+(Charles M. Schulz, <a href="https://www.gocomics.com/peanuts/1980/06/13"><em>Peanuts</em>, 1980-06-13</a>)
</li>
</ul>
<h2>Jokes</h2>
@@ -621,7 +621,7 @@
</ul>
<h2>See also</h2>
<ul>
-<li><a href="tz-link.html">Sources for Time Zone and Daylight Saving
+<li><a href="tz-link.html">Time Zone and Daylight Saving
Time Data</a></li>
</ul>
<hr>
diff -r 1de09f119b0b -r 5d1f8a0f8ca4 lib/libc/time/tz-link.html
--- a/lib/libc/time/tz-link.html Tue Aug 16 10:56:21 2022 +0000
+++ b/lib/libc/time/tz-link.html Tue Aug 16 11:07:40 2022 +0000
@@ -1,14 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
-<title>Sources for time zone and daylight saving time data</title>
+<title>Time zone and daylight saving time data</title>
<meta charset="UTF-8">
<style>
pre {margin-left: 2em; white-space: pre-wrap;}
</style>
</head>
<body>
-<h1>Sources for time zone and daylight saving time data</h1>
+<h1>Time zone and daylight saving time data</h1>
<p>
<a href="https://en.wikipedia.org/wiki/Time_zone">Time zone</a> and
<a href="https://en.wikipedia.org/wiki/Daylight_saving_time">daylight-saving</a>
@@ -52,9 +52,9 @@
<li><a href="#costs">Costs and benefits of time shifts</a></li>
<li><a href="#precision">Precision timekeeping</a></li>
<li><a href="#notation">Time notation</a></li>
- <li><a href="#see-also">See also</a></li>
</ul>
</li>
Home |
Main Index |
Thread Index |
Old Index