libical / vzic

A program to convert the IANA (formerly Olson) timezone database files into VTIMEZONE files compatible with the iCalendar (RFC5445) and TZDIST (RFC7808) specifications
Other
16 stars 14 forks source link

Europe/Moscow time zone file is incorrectly generated in Pure mode: #3

Closed agalanin closed 6 years ago

agalanin commented 6 years ago

Looks like vzic ignores last timezone modification entry in "Pure" mode:

The last STANDARD section (in generated Moscow.ics) is:

BEGIN:STANDARD
TZOFFSETFROM:+0300                                                             
TZOFFSETTO:+0400                                                               
TZNAME:MSK
DTSTART:20110327T020000                                                        
RDATE:20110327T020000                                                          
END:STANDARD

But Europe/Moscow zone definition in Olson timezone file is

Zone Europe/Moscow       2:30:17 -      LMT     1880
                         2:30:17 -      MMT     1916 Jul  3 # Moscow Mean Time
                         2:31:19 Russia %s      1919 Jul  1  0:00u
                         3:00   Russia  %s      1921 Oct
                         3:00   Russia  MSK/MSD 1922 Oct
                         2:00   -       EET     1930 Jun 21
                         3:00   Russia  MSK/MSD 1991 Mar 31  2:00s
                         2:00   Russia  EE%sT   1992 Jan 19  2:00s
                         3:00   Russia  MSK/MSD 2011 Mar 27  2:00s
                         4:00   -       MSK     2014 Oct 26  2:00s
                         3:00   -       MSK

So there must be one more STANDARD section in generated file. This must look like:

BEGIN:STANDARD
TZOFFSETFROM:+0400                                                             
TZOFFSETTO:+0300                                                               
TZNAME:MSK
DTSTART:20141026T020000                                                        
RDATE:20141026T020000                                                          
END:STANDARD
ksmurchison commented 6 years ago

The last transition is included as an RDATE in a previous STANDARD component:

BEGIN:STANDARD TZNAME:MSK TZOFFSETFROM:+0400 TZOFFSETTO:+0300 DTSTART:19190816T000000 RDATE:19211001T000000 RDATE:20141026T020000 END:STANDARD

Do you have software that is ignoring that transition?

agalanin commented 6 years ago

OK, I found this STANDARD component in a generated file. But why you are calling it "previous"? There are six other STANDARD sections between RDATE:20141026T020000 and the last STANDARD in a zoneinfo/Europe/Moscow.ics. Is this valid?

BEGIN:STANDARD
TZNAME:MSK
TZOFFSETFROM:+0400
TZOFFSETTO:+0300
DTSTART:19190816T000000
RDATE:19211001T000000
RDATE:20141026T020000
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:MSD
TZOFFSETFROM:+0300
TZOFFSETTO:+0400
DTSTART:19210214T230000
END:DAYLIGHT
BEGIN:DAYLIGHT
TZNAME:+05
TZOFFSETFROM:+0400
TZOFFSETTO:+0500
DTSTART:19210320T230000
END:DAYLIGHT
BEGIN:DAYLIGHT
TZNAME:MSD
TZOFFSETFROM:+0500
TZOFFSETTO:+0400
DTSTART:19210901T000000
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:EET
TZOFFSETFROM:+0300
TZOFFSETTO:+0200
DTSTART:19221001T000000
RDATE:19910929T030000
END:STANDARD
BEGIN:STANDARD
TZNAME:MSK
TZOFFSETFROM:+0200
TZOFFSETTO:+0300
DTSTART:19300621T000000
RDATE:19920119T020000
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:MSD
TZOFFSETFROM:+0300
TZOFFSETTO:+0400
DTSTART:19810401T000000
RRULE:FREQ=YEARLY;UNTIL=19840331T210000Z
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:MSK
TZOFFSETFROM:+0400
TZOFFSETTO:+0300
DTSTART:19811001T000000
RRULE:FREQ=YEARLY;UNTIL=19830930T200000Z
END:STANDARD
BEGIN:STANDARD
TZNAME:MSK
TZOFFSETFROM:+0400
TZOFFSETTO:+0300
DTSTART:19840930T030000
RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU;UNTIL=19900929T230000Z
END:STANDARD
BEGIN:DAYLIGHT
TZNAME:MSD
TZOFFSETFROM:+0300
TZOFFSETTO:+0400
DTSTART:19850331T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU;UNTIL=19900324T230000Z
END:DAYLIGHT
BEGIN:DAYLIGHT
TZNAME:EEST
TZOFFSETFROM:+0300
TZOFFSETTO:+0300
DTSTART:19910331T020000
END:DAYLIGHT
BEGIN:DAYLIGHT
TZNAME:MSD
TZOFFSETFROM:+0300
TZOFFSETTO:+0400
DTSTART:19920329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU;UNTIL=20100327T230000Z
END:DAYLIGHT
BEGIN:STANDARD
TZNAME:MSK
TZOFFSETFROM:+0400
TZOFFSETTO:+0300
DTSTART:19920927T030000
RRULE:FREQ=YEARLY;BYMONTH=9;BYDAY=-1SU;UNTIL=19950923T230000Z
END:STANDARD
BEGIN:STANDARD
TZNAME:MSK
TZOFFSETFROM:+0400
TZOFFSETTO:+0300
DTSTART:19961027T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU;UNTIL=20101030T230000Z
END:STANDARD
BEGIN:STANDARD
TZNAME:MSK
TZOFFSETFROM:+0300
TZOFFSETTO:+0400
DTSTART:20110327T020000
END:STANDARD
ksmurchison commented 6 years ago

As far as I know, it is valid per RFC 5545. Nothing states that the subcomponents or DTSTARTs or RDATEs need to be in sequential order.

agalanin commented 6 years ago

Thank you for explanation.