diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index 00e9c352b..1fe2c27c8 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -1,3 +1,8 @@ +2012-08-21 Francis Lachapelle + + * iCalRepeatableEntityObject.m (-exceptionDatesWithTimeZone:): we + now consider the timezone of the EXDATE, if defined. + 2012-05-30 Francis Lachapelle * iCalRepeatableEntityObject.m (-exceptionDatesWithTimeZone:) diff --git a/SOPE/NGCards/iCalRepeatableEntityObject.m b/SOPE/NGCards/iCalRepeatableEntityObject.m index 66173119e..4cc9437a3 100644 --- a/SOPE/NGCards/iCalRepeatableEntityObject.m +++ b/SOPE/NGCards/iCalRepeatableEntityObject.m @@ -33,6 +33,7 @@ #import "iCalDateTime.h" #import "iCalEvent.h" #import "iCalTimeZone.h" +#import "iCalTimeZonePeriod.h" #import "iCalRecurrenceRule.h" #import "iCalRecurrenceCalculator.h" #import "iCalRepeatableEntityObject.h" @@ -258,19 +259,19 @@ while ((dateString = [dateList nextObject])) { - exDates = [(iCalDateTime*) dateString valuesAtIndex: 0 forKey: @""]; - for (i = 0; i < [exDates count]; i++) + exDates = [(iCalDateTime*) dateString dateTimes]; + for (i = 0; i < [exDates count]; i++) { - dateString = [exDates objectAtIndex: i]; + exDate = [exDates objectAtIndex: i]; + + // Example: timezone is -0400, date is 2012-05-24 (00:00:00 +0000), + // and changes to 2012-05-24 04:00:00 +0000 if ([theTimeZone isKindOfClass: [iCalTimeZone class]]) { - exDate = [(iCalTimeZone *) theTimeZone computedDateForString: dateString]; + exDate = [(iCalTimeZone *) theTimeZone computedDateForDate: exDate]; } else { - // Example: timezone is -0400, date is 2012-05-24 (00:00:00 +0000), - // and changes to 2012-05-24 04:00:00 +0000 - exDate = [dateString asCalendarDate]; offset = [(NSTimeZone *) theTimeZone secondsFromGMTForDate: exDate]; exDate = (NSCalendarDate *) [exDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:-offset];