rrule.js UNTIL is miscalculated when DTSTART has timezone (TZID)

28 Views Asked by At

ive found a weird behaviour in rrule.js which seems like a bug. but i couldnt find any complains about it. so im tryiing my luck here. maybe someone can share some wisdom...

description When DTSTART has timezone (TZID), and UNTIL is in UTC time (how it should be following in the spec). the library mistakenly regarding it as in local time. which leads to wrong events output

example using this RRULE RRule.fromString('DTSTART;TZID=Asia/Jerusalem:20230805T123000\nRRULE:FREQ=WEEKLY;UNTIL=20230819T093000Z').all() ends up with only 2 events:

2023-08-05T12:30:00.000Z 2023-08-12T12:30:00.000Z when it should render one more event (2023-08-19T12:30:00.000Z)

specification If the "DTSTART" property is specified as a date with UTC time or a date with local time and time zone reference, then the UNTIL rule part MUST be specified as a date with UTC time.

a live example https://codesandbox.io/embed/rrule-forked-39whj8?fontsize=14&hidenavigation=1&theme=dark

origin python lib is behaving correctly and resulting with the correct events. please see the following example https://www.online-python.com/TY1pxQZaGr

using version 2.7.2, macOS 13.4.1 (c) local timezone: Israel Daylight Time

Thanks Zach

0

There are 0 best solutions below