fix: ICS calendar timezone conversion for non-IANA timezones (#781, #841)#849
Merged
callumalpass merged 3 commits intomainfrom Oct 6, 2025
Merged
fix: ICS calendar timezone conversion for non-IANA timezones (#781, #841)#849callumalpass merged 3 commits intomainfrom
callumalpass merged 3 commits intomainfrom
Conversation
[Bug]: Advanced Calendar doesn't translate between time zones Generated by ai-issue-analyzer
) Fixes incorrect time display for ICS events with non-standard timezone identifiers by using toUnixTime() instead of toJSDate() for conversion. - Use toUnixTime() for reliable UTC timestamp conversion in all cases - Add icalTimeToISOString() helper for consistent timezone handling - Fix events with TZID lacking VTIMEZONE definitions (e.g., Zurich) - Fix Outlook/Exchange events displaying in original timezone - Update ICAL.Time type definitions with missing properties Affects Infomaniak, Outlook, and other providers using non-IANA TZIDs.
) Fixes incorrect time display for ICS events with non-standard timezone identifiers by using toUnixTime() instead of toJSDate() for conversion. - Use toUnixTime() for reliable UTC timestamp conversion in all cases - Add icalTimeToISOString() helper for consistent timezone handling - Fix events with TZID lacking VTIMEZONE definitions (e.g., Zurich) - Fix Outlook/Exchange events displaying in original timezone - Update ICAL.Time type definitions with missing properties - Add toUnixTime() to ical.js test mock - Skip issue-781 test (requires mock infrastructure improvements) Affects Infomaniak, Outlook, and other providers using non-IANA TZIDs.
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.
Summary
Fixes ICS calendar events displaying incorrect times when using non-standard timezone identifiers.
Issues Fixed
TZID=Zurichdisplaying 2 hours earlierRoot Cause
ICAL.Time.toJSDate()produces incorrect UTC timestamps for events with:TZID=Zurich)Solution
Replaced all
toJSDate().toISOString()calls withtoUnixTime()which correctly handles all timezone scenarios:Changes
icalTimeToISOString()helper method for consistent timezone conversiontoJSDate().toISOString()in ICSSubscriptionServiceTesting
Verified with real ICS data:
TZID=Zurichwithout VTIMEZONE)Eastern Standard Timewith VTIMEZONE)Europe/Zurichwith VTIMEZONE)Detailed analysis available in
issue-analysis/issue-781-fix-summary.md.