mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2025-11-22 12:01:14 +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:
16
newtzset.3
16
newtzset.3
@ -132,6 +132,10 @@ describes when the change back happens. Each
|
||||
.I time
|
||||
field describes when, in current local time, the change to the other
|
||||
time is made.
|
||||
As an extension to POSIX, daylight saving is assumed to be in effect
|
||||
all year if it begins January 1 at 00:00 and ends December 31 at
|
||||
24:00 plus the difference between daylight saving and standard time,
|
||||
leaving no room for standard time in the calendar.
|
||||
.IP
|
||||
The format of
|
||||
.I date
|
||||
@ -183,7 +187,7 @@ or
|
||||
.RB `` \(pl '').
|
||||
As an extension to POSIX, the hours part of
|
||||
.I time
|
||||
can range from \(mi167 to 167; this allows for unusual rules such
|
||||
can range from \(mi167 through 167; this allows for unusual rules such
|
||||
as "the Saturday before the first Sunday of March". The default, if
|
||||
.I time
|
||||
is not given, is
|
||||
@ -212,6 +216,16 @@ stands for Israel standard time (IST) and Israel daylight time (IDT),
|
||||
fourth Thursday in March (i.e., 02:00 on the first Friday on or after
|
||||
March 23), and fall back at 02:00 on the last Sunday in October.
|
||||
.TP
|
||||
.B WART4WARST,J1/0,J365/25
|
||||
stands for Western Argentina Summer Time (WARST), 3 hours behind UTC.
|
||||
There is a dummy transition to standard time on December 31 at 25:00
|
||||
daylight saving time (i.e., 24:00 standard time, equivalent to January
|
||||
1 at 00:00 standard time), and a simultaneous transition to daylight
|
||||
saving time on January 1 at 00:00 standard time, so daylight saving
|
||||
time is in effect all year and the initial
|
||||
.B WART
|
||||
is a placeholder.
|
||||
.TP
|
||||
.B WGT3WGST,M3.5.0/\(mi2,M10.5.0/\(mi1
|
||||
stands for Western Greenland Time (WGT) and Western Greenland Summer
|
||||
Time (WGST), 3 hours behind UTC, where clocks follow the EU rules of
|
||||
|
||||
Reference in New Issue
Block a user