diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 61e4f071a..6591eb3a0 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -3441,7 +3441,7 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir if ([element isKindOfClass: iCalEventK]) { event = (iCalEvent *)element; - timezone = [event adjustInContext: self->context]; + timezone = [event adjustInContext: self->context withTimezones: timezones]; if ([event recurrenceId]) { diff --git a/SoObjects/Appointments/SOGoAppointmentObject.m b/SoObjects/Appointments/SOGoAppointmentObject.m index 0143992fb..b6367b9e0 100644 --- a/SoObjects/Appointments/SOGoAppointmentObject.m +++ b/SoObjects/Appointments/SOGoAppointmentObject.m @@ -1943,7 +1943,7 @@ inRecurrenceExceptionsForEvent: (iCalEvent *) theEvent { event = [allEvents objectAtIndex: i]; - tz = [event adjustInContext: context]; + tz = [event adjustInContext: context withTimezones: nil]; if (tz) [rqCalendar addTimeZone: tz]; diff --git a/SoObjects/Appointments/iCalEvent+SOGo.h b/SoObjects/Appointments/iCalEvent+SOGo.h index ea4682d82..cfa351d1b 100644 --- a/SoObjects/Appointments/iCalEvent+SOGo.h +++ b/SoObjects/Appointments/iCalEvent+SOGo.h @@ -31,7 +31,7 @@ - (BOOL) isStillRelevant; - (NSTimeInterval) occurenceInterval; - (void) updateRecurrenceRulesUntilDate: (NSCalendarDate *) previousEndDate; -- (iCalTimeZone *) adjustInContext: (WOContext *) context; +- (iCalTimeZone *) adjustInContext: (WOContext *) context withTimezones: (NSDictionary *) timezones; @end diff --git a/SoObjects/Appointments/iCalEvent+SOGo.m b/SoObjects/Appointments/iCalEvent+SOGo.m index 005dd2a36..1710a91c7 100644 --- a/SoObjects/Appointments/iCalEvent+SOGo.m +++ b/SoObjects/Appointments/iCalEvent+SOGo.m @@ -446,6 +446,7 @@ } - (iCalTimeZone *) adjustInContext: (WOContext *) context + withTimezones: (NSDictionary *) timezones { iCalDateTime *startDate, *endDate; iCalTimeZone *timezone; @@ -484,6 +485,9 @@ if ([timezoneId length]) { timezone = [iCalTimeZone timeZoneForName: timezoneId]; + // Fallback to tz (VTIMEZONE) found in the ics. + if (!timezone) + timezone = [timezones valueForKey: timezoneId]; } else {