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

Timezone output is incorrect #7

Closed jcaron23 closed 5 years ago

jcaron23 commented 5 years ago

Initially I thought only the output for Europe/London was incorrect. There is a rule for transition from DST to standard time, but the other rule (which should be standard to DST) has incorrect type, name, offsets (identical) and no RRULE (shortened for clarity):

BEGIN:VTIMEZONE
  BEGIN:STANDARD
    TZNAME:GMT
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0000
    DTSTART:19701025T020000
    RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
  END:STANDARD
  BEGIN:STANDARD
    TZNAME:GMT
    TZOFFSETFROM:+0000
    TZOFFSETTO:+0000
    DTSTART:19700101T000000
  END:STANDARD
END:VTIMEZONE

It seems many (most) other timezones have issues as well. For instance America/Los_Angeles:

It's hard to find exactly what change caused this as many of the commits lead to versions which can't parse the tzdata included in the same commit, but this seems to be quite old.

I wasn't able to make the tests complain about it, so either I don't run the way they're supposed to, or the tests are broken as well.

I'll try to isolate this further if I find the time, but if someone more familiar with the code can get a look it might be quicker.

ksmurchison commented 5 years ago

This appears to only be an issue when NOT running with --pure. I'll look into it.

ksmurchison commented 5 years ago

@winterz Have you seen this problem? I can't find the root cause.

I always use --pure because it produces better output and I would hope/expect that Outlook can handle ALL legal VTIMEZONEs by now. If this is indeed the case, perhaps we could/should make --pure the default

ksmurchison commented 5 years ago

Looks like the problem started here: https://github.com/libical/vzic/commit/c98e4b814a0ba2a9f5cb3a6459f2b6f875d03fbc#diff-d58d7599a386552bce8e4e37779fb6d7

Commenting out the RRULE_START_YEAR stuff (partially?) solves the 1970 problem. Still looking into it, but I have no idea what kind of gumnastics are necessary for generating Outlook-compatible VTIIMEZONEs.

ksmurchison commented 5 years ago

Should be fixed by: https://github.com/libical/vzic/commit/a59b4abf32ed049d12c05db0f472575e1e9529a3