On Tue, Sep 05, 2006 at 07:47:23AM +0200, Srdjan Krajnalic wrote:
Thank you for answering. That solution crossed my mind, but not being thoroughly familiar with data I thought better to ask
Sure...
because the time zone that appears to be appropriate is from the second rule line for the same year, but in same cases there is only one rule to apply to the given year.
I think we're still not explaining it right...
So, if the only cases are "one or more lines, if two or more go with the second name" that's good enough :-)
The choice is not not betwen first- and second- listed: the one to choose is whichever is the oldest entry (by "From" year) for standard time. And by "for standard time", I mean that the "SAVE" column is zero.
Another thing that might be worth mentioning - the problem from the previous letter may also occur in the middle of zone rules. For example:
Rule Algeria 1918 only - Mar 9 23:00s 1:00 S Rule Algeria 1919 only - Mar 1 23:00s 1:00 S Rule Algeria 1920 only - Feb 14 23:00s 1:00 S Rule Algeria 1920 only - Oct 23 23:00s 0 - Rule Algeria 1921 only - Mar 14 23:00s 1:00 S Rule Algeria 1921 only - Jun 21 23:00s 0 - Rule Algeria 1939 only - Sep 11 23:00s 1:00 S Rule Algeria 1939 only - Nov 19 1:00 0 -
In this case, between 1921-Jun-21 and 1939-Sep-11, the need again arises to resort to the default zone line GMTOFF. In case of Algiers, the last 1921 SAVE is appropriate through 1939-Sep-11 (0 SAVE in GMT), but in other cases it would not be.
Uh... no magic --- the last transition left us there, and we have yet to see the next transition: i.e., once the transition from daylight saving to standard time happened in June of 1921, Algiers continued to stay on standard time until the next transition in September of 1939. The key is that the Rule entries do not directly specify what the offset is for a given date, but rather they express the set of when transitions between standard and daylight saving time occur. The offset from UTC (nee GMT) is determined by the algebraic sum of the GMTOFF specified in the current Zone rule and the SAVE value specified in the most-recently-invoked Rule entry. The name assigned to the zone is determined by the FORMAT entry of the current Zone rule, possibly modified by the LETTER/S entry of the most-recently-invoked Rule entry. Put another way, the Zone and Rule entries are intended as a more compact and more readily edited way of expressing *transitions* within a time zone. Omitting the GMT/UTC offsets, this is what the entry for Algiers might look like written out in "longhand": Fri 1911-03-10 23:59:59 PMT -> 23:50:39 WET Wed 1916-06-14 22:59:59 WET -> 06-15 00:00:00 WEST Sun 1916-10-01 23:59:59 WEST -> 23:00:00 WET Sat 1917-03-24 22:59:59 WET -> 03-25 00:00:00 WEST Sun 1917-10-07 23:59:59 WEST -> 23:00:00 WET Sat 1918-03-09 22:59:59 WET -> 03-10 00:00:00 WEST Sun 1918-10-06 23:59:59 WEST -> 23:00:00 WET Sat 1919-03-01 22:59:59 WET -> 03-02 00:00:00 WEST Sun 1919-10-05 23:59:59 WEST -> 23:00:00 WET Sat 1920-02-14 22:59:59 WET -> 02-15 00:00:00 WEST Sat 1920-10-23 23:59:59 WEST -> 23:00:00 WET Mon 1921-03-14 22:59:59 WET -> 03-15 00:00:00 WEST Tue 1921-06-21 23:59:59 WEST -> 23:00:00 WET Mon 1939-09-11 22:59:59 WET -> 09-12 00:00:00 WEST Sun 1939-11-19 00:59:59 WEST -> 00:00:00 WET Sun 1940-02-25 01:59:59 WET -> 03:00:00 CET Mon 1944-04-03 01:59:59 CET -> 03:00:00 CEST Sun 1944-10-08 01:59:59 CEST -> 01:00:00 CET Mon 1945-04-02 01:59:59 CET -> 03:00:00 CEST Sun 1945-09-16 00:59:59 CEST -> 00:00:00 CET Sun 1946-10-06 23:59:59 CET -> 23:00:00 WET Sat 1956-01-28 23:59:59 WET -> 01-29 01:00:00 CET Sat 1963-04-13 23:59:59 CET -> 23:00:00 WET Sun 1971-04-25 22:59:59 WET -> 04-26 00:00:00 WEST Sun 1971-09-26 23:59:59 WEST -> 23:00:00 WET Thu 1977-05-05 23:59:59 WET -> 05-06 01:00:00 WEST Thu 1977-10-20 23:59:59 WEST -> 10-21 00:00:00 CET Fri 1978-03-24 00:59:59 CET -> 02:00:00 CEST Fri 1978-09-22 02:59:59 CEST -> 02:00:00 CET Thu 1979-10-25 23:59:59 CET -> 23:00:00 WET Thu 1980-04-24 23:59:59 WET -> 04-25 01:00:00 WEST Fri 1980-10-31 01:59:59 WEST -> 01:00:00 WET Thu 1981-04-30 23:59:59 WET -> 05-01 01:00:00 CET HTH, --Ken Pizzini