fix(calendar): update to node-ical 0.23.1 and fix full-day recurrence lookup#4013
Merged
sdetweil merged 3 commits intoMagicMirrorOrg:developfrom Jan 12, 2026
Merged
Conversation
Remove ineffective UNTIL modification and unnecessary tzid clearing. Simplify timed event conversion. The removed code had no effect because rule.options is a read-only getter in rrule-temporal.
…rn timezones When looking up recurrence overrides (moved/modified instances), the dateKey was always calculated from UTC time. This caused a mismatch for full-day events in timezones east of UTC (e.g., Europe/Berlin). Example: - Full-day event on Oct 12 in Europe/Berlin (UTC+2) - Old: dateKey = "2024-10-11" (from UTC: Oct 11 22:00) - New: dateKey = "2024-10-12" (from local date components) node-ical's getDateKey() uses local date components for VALUE=DATE events, as per RFC 5545 specification. MagicMirror now matches this behavior. This fixes moved full-day recurring events not being found in their recurrence override table, causing them to appear on the wrong date. Related: node-ical upgrade to 0.23.1
Collaborator
|
Thanks @KristjanESPERANTO this fixed my calendar again |
Collaborator
Author
|
Great 🙂 The switch from rrule to rrule-temporal at node-ical was certainly the right strategic move, but it does come with some migration pains. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
getDateKey()behavior for VALUE=DATE events (now uses local date components)2. Remove dead code
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:
Example:
"2024-10-12"(local date)"2024-10-11"(from UTC: Oct 11 22:00)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
rruletorrule-temporal, introducing breaking changes. Version 0.23.1 fixed the UNTIL validation issue and formalized thegetDateKey()behavior for DATE vs DATE-TIME values, following RFC 5545 specification that DATE values represent local calendar dates without timezone context.