-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Update node-ical and support it's rrule-temporal changes #4010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Adapt getMomentsFromRecurringEvent to work with node-ical 0.23.0's new rrule-temporal implementation. Date objects now represent the correct instant and can be directly converted to moments in the event timezone, without manual UTC interpretation. Fixes 16 failing tests for recurring events and DST handling.
|
I am too far away from calendar stuff, so one of the other two should review and merge this. |
|
This somehow broke my calendar, now all I get is [2026-01-11 16:55:06.911] [ERROR] [calendar] Calendar Error. Could not fetch calendar: https://xxxxxxx.de/caldav/kalender/home/ Error: UNTIL rule part MUST always be specified as a date with UTC time |
|
can u add to logLevel property and find the error and what event it is and then and edit the somefile.txt to find the VEVENT for that event.. and share that when your timezone.. I don't see that error on my calendar (using develop) |
|
you did npm install again after pulling develop, as it changes the node-ical dependency which this is based off of |
This comes from I am now quite sure what the problem is: @rejas Could you still show us the UNTIL entry? |
… lookup (#4013) Adapts calendar module to node-ical changes and fixes a bug with moved full-day recurring events in eastern timezones. ## Changes ### 1. Update node-ical to 0.23.1 - Includes upstream fixes for UNTIL UTC validation errors from CalDAV servers (reported by @rejas in PR #4010) - Changes to `getDateKey()` behavior for VALUE=DATE events (now uses local date components) - Fixes issue with malformed DURATION values (reported by MagicMirror user here: jens-maus/node-ical#381) ### 2. Remove dead code - Removed ineffective UNTIL modification code (rule.options is read-only in rrule-temporal) - The code attempted to extend UNTIL for all-day events but had no effect ### 3. Fix recurrence lookup for full-day events node-ical changed the behavior of `getDateKey()` - it now uses local date components for VALUE=DATE events instead of UTC. This broke recurrence override lookups for full-day events in eastern timezones. **Why it broke:** - **before node-ical update:** Both node-ical and MagicMirror used UTC → keys matched ✅ - **after node-ical update:** node-ical uses local date (RFC 5545 conform), MagicMirror still used UTC → **mismatch** ❌ **Example:** - Full-day recurring event on October 12 in Europe/Berlin (UTC+2) - node-ical 0.23.1 stores override with key: `"2024-10-12"` (local date) - MagicMirror looked for key: `"2024-10-11"` (from UTC: Oct 11 22:00) - **Result:** Moved event not found, appears on wrong date **Solution:** Adapt to node-ical's new behavior by using local date components for full-day events, UTC for timed events. **Note:** This is different from previous timezone fixes - those addressed event generation, this fixes the lookup of recurrence overrides. ## Background node-ical 0.23.0 switched from `rrule` to `rrule-temporal`, introducing breaking changes. Version 0.23.1 fixed the UNTIL validation issue and formalized the `getDateKey()` behavior for DATE vs DATE-TIME values, following RFC 5545 specification that DATE values represent local calendar dates without timezone context.
|
Sorry for not answering yesterday, had to entertain the kids ;-) Anyway, 0.23.1 fixes my bug and the calendar shows up again. Do you still need the Event from my calendar to see? |
|
Only if it doesn't involve too much effort. I'd just be curious to see what UNTIL looks like and which server violating RFC 5545. If it's an open source server, I would take a closer look at it - or open an issue at least. |
Updating
node-icaland adapt logic to new behaviour.Problem
node-ical 0.23.0 switched from
rrule.jstorrule-temporal, changing how recurring event dates are returned. Our code assumed the old behavior where dates needed manual timezone conversion.Solution
Updated
getMomentsFromRecurringEvent()incalendarfetcherutils.js:tzid = nullclearing (no longer needed)moment.tz(date, eventTimezone)instead ofmoment.tz(date, "UTC").tz(eventTimezone, true)