ical.js icon indicating copy to clipboard operation
ical.js copied to clipboard

Fix timezone convertion in case a given timezone has a RRULE in the future and the start date in the past of the datetime in question

Open DeepDiver1975 opened this issue 5 years ago • 8 comments

Please correct me if I'm wrong!

It looks like that the timezone conversion logic is not properly working for the given test timezone Europe/Berlin2

The standard timezone does not apply but the daylight one does for the given datetime 2019-10-25T15:30:00Z

I'll try to come up with a fix. Please meanwhile let me know if the test assumption is correct. THX

BEGIN:VCALENDAR
PRODID:-//tzurl.org//NONSGML Olson 2012h//EN
VERSION:2.0
BEGIN:VTIMEZONE
TZID:Europe/Berlin2
BEGIN:STANDARD
DTSTART:20191027T030000
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
END:STANDARD
BEGIN:DAYLIGHT
DTSTART:20190331T020000
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
RDATE:20200329T020000
TZNAME:CEST
END:DAYLIGHT
END:VTIMEZONE
END:VCALENDAR

DeepDiver1975 avatar Feb 26 '20 10:02 DeepDiver1975

Looks like only the RDATE of daylight is taken into account when computing the changes array:

Screenshot from 2020-02-26 11-31-52

DeepDiver1975 avatar Feb 26 '20 10:02 DeepDiver1975

Coverage Status

Coverage increased (+0.1%) to 97.088% when pulling 3e3b3c1c064c0070af9db15cd946807d3c43dacf on DeepDiver1975:test/convert-timezone into 78122e661f584ad735ce33f6f3d08d7b91c0e4eb on mozilla-comm:master.

coveralls avatar Feb 26 '20 11:02 coveralls

Who can review this please? @kewisch maybe? THX a lot!

DeepDiver1975 avatar Mar 02 '20 14:03 DeepDiver1975

Who can review this please? @kewisch maybe? THX a lot!

:wave: @kewisch

DeepDiver1975 avatar Mar 10 '20 09:03 DeepDiver1975

:zzz:

DeepDiver1975 avatar Mar 16 '20 16:03 DeepDiver1975

:wave: anybody out there?

DeepDiver1975 avatar Apr 15 '20 17:04 DeepDiver1975

Thanks for the patch, I'll see what I can do to get this in soon. I need to somehow fix my overflowing github notification emails folder.

kewisch avatar Jun 30 '20 10:06 kewisch

Since you may have seen some other activity here recently, I'm acknowledging that I've seen this and still have not fixed my notifications. This change is slightly to large for me to make a call right now, though I really want to get some of these PRs merged. Hoping to try again when I have a larger chunk of time.

kewisch avatar Jul 13 '21 11:07 kewisch