From 244d1388eb00c060c5302e5bfd997fd397820bc0 Mon Sep 17 00:00:00 2001 From: Hivert Quentin Date: Fri, 1 Aug 2025 11:56:06 +0200 Subject: [PATCH] fix(calendar): fetch our own iana timezone instead of trusting VTIMEZONE --- SOPE/NGCards/iCalDateTime.m | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/SOPE/NGCards/iCalDateTime.m b/SOPE/NGCards/iCalDateTime.m index 0826c9ffc..8ee622819 100644 --- a/SOPE/NGCards/iCalDateTime.m +++ b/SOPE/NGCards/iCalDateTime.m @@ -86,8 +86,13 @@ tzId = [self value: 0 ofAttribute: @"tzid"]; if ([tzId length]) { - calendar = (iCalCalendar *) [self searchParentOfClass: [iCalCalendar class]]; - timeZone = [calendar timeZoneWithId: tzId]; + //Hack, get timezone inf from sogo and not from the event VTIMEZONE as it can be incorrect/incomplete + timeZone = [iCalTimeZone timeZoneForName: tzId]; + if(!timeZone) + { + calendar = (iCalCalendar *) [self searchParentOfClass: [iCalCalendar class]]; + timeZone = [calendar timeZoneWithId: tzId]; + } //if (!timeZone) //[self logWithFormat: @"timezone '%@' not found in calendar", tzId]; }