From 5e466cf968666cfd4d1d83386ec29c031412da37 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 19 Apr 2011 20:39:12 +0000 Subject: [PATCH] See ChangeLog. Monotone-Parent: 6f81ff5c61f2abaad8d6b69b657abb61e52df9b9 Monotone-Revision: c4b00c603f23bbc97a3d07724c6b2a4e9361c098 Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2011-04-19T20:39:12 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ .../Appointments/SOGoAppointmentFolder.m | 20 +++++++++---------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1a5490181..df803a8e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-04-19 Francis Lachapelle + + * SoObjects/Appointments/SOGoAppointmentFolder.m + (-_flattenCycleRecord:forRange:intoArray:): fixed the + verification of the event's timezone. + 2011-04-15 Francis Lachapelle * SoObjects/Appointments/iCalEvent+SOGo.m (-firstOccurenceRange): diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 2419a203b..78117c7ac 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -850,8 +850,8 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir NSArray *rules, *exRules, *exDates, *ranges; NSArray *elements, *components; NSString *content; - id firstStartDate, firstEndDate; - NSCalendarDate *checkStartDate, *checkEndDate; + iCalDateTime *dtstart; + NSCalendarDate *checkStartDate, *checkEndDate, *firstStartDate, *firstEndDate; iCalEvent *component; iCalTimeZone *eventTimeZone; unsigned count, max, offset; @@ -890,14 +890,14 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir { // Retrieve the range of the first/master event component = [components objectAtIndex: 0]; - firstStartDate = [component uniqueChildWithTag: @"dtstart"]; - firstStartDate = [[[firstStartDate values] lastObject] asCalendarDate]; + dtstart = (iCalDateTime *)[component uniqueChildWithTag: @"dtstart"]; + firstStartDate = [[[dtstart values] lastObject] asCalendarDate]; firstEndDate = [firstStartDate addTimeInterval: [component occurenceInterval]]; firstRange = [NGCalendarDateRange calendarDateRangeWithStartDate: firstStartDate endDate: firstEndDate]; - - eventTimeZone = [(iCalDateTime*)firstStartDate timeZone]; + + eventTimeZone = [dtstart timeZone]; if (eventTimeZone) { // Adjust the range to check with respect to the event timezone (extracted from the start date) @@ -921,10 +921,10 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir // The event lasts all-day and has no timezone (floating); we convert the range of the first event // to the user's timezone offset = [timeZone secondsFromGMTForDate: [firstRange startDate]]; - firstStartDate = (NSCalendarDate*)[[firstRange startDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 - seconds:-offset]; - firstEndDate = (NSCalendarDate*)[[firstRange endDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 - seconds:-offset]; + firstStartDate = [[firstRange startDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 + seconds:-offset]; + firstEndDate = [[firstRange endDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 + seconds:-offset]; [firstStartDate setTimeZone: timeZone]; [firstEndDate setTimeZone: timeZone]; firstRange = [NGCalendarDateRange calendarDateRangeWithStartDate: firstStartDate