mirror of
https://github.com/MichMich/MagicMirror.git
synced 2026-04-25 23:32:10 +00:00
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: https://github.com/jens-maus/node-ical/issues/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.