1
0
mirror of https://frontier.innolan.net/rainlance/amiga-tz.git synced 2026-05-06 23:47:44 +00:00

Improve the support for perpetual DST.

Problem reported by Zefram in
<http://mm.icann.org/pipermail/tz/2013-September/020059.html>.
* localtime.c (tzparse): Elide simultaneous entries out of and
into DST if DST goes for an hour more than a year (actually, for
more than the DST offset more than a year).  Since this
optimization can elide all entries, avoid looping forever looking
for entries that will never arrive.  While we're at it, fix
another portability bug where the code assumed wraparound on
signed integer overflow.
* newtzset.3, tzfile.5: Mention that as an extension to POSIX,
if DST covers the entire year plus the DST offset, it's assumed to
be in effect all year.  Give an example.
* zic.c (stringrule): Omit the "J" in January and February,
as this can save a byte or two in the output.
(rule_cmp): New function.
(stringzone): Do a better job of constructing the standard-time
abbreviation when there is perpetual DST.  Defer to the new
stringrule to construct the times for perpetual DST.
Fix bug noted by Zefram, which caused a stray hour of standard
time to be inserted in an otherwise perpetual DST.
Previously, this code generated "WARST4WARST,J1/0,J365/24"
for the San Luis example; now it generates "WART4WARST,0/0,J365/25".
This commit is contained in:
Paul Eggert
2013-09-08 07:49:22 -07:00
parent 019082fd45
commit 30364485a6
4 changed files with 102 additions and 41 deletions

View File

@@ -145,10 +145,14 @@ POSIX-TZ-environment-variable-style string for use in handling instants
after the last transition time stored in the file
(with nothing between the newlines if there is no POSIX representation for
such instants).
This string may use a minor extension to the POSIX TZ format: the
hours part of its transition times may be signed and range from
As described in
.IR newtzset (3),
this string may use two minor extensions to the POSIX TZ format.
First, the hours part of its transition times may be signed and range from
\(mi167 through 167 instead of the POSIX-required unsigned values
from 0 through 24.
from 0 through 24. Second, DST is in effect all year if it starts
January 1 at 00:00 and ends December 31 at 24:00 plus the difference
between daylight saving and standard time.
.SH SEE ALSO
newctime(3), newtzset(3)
.\" This file is in the public domain, so clarified as of