Monotone-Parent: 093eb3ebcf238b8c813759fda17e22addd7cc0b0

Monotone-Revision: 34dbce3026b164b07c558711781fcfb5cde0fcff

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-11-03T14:17:57
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-11-03 14:17:57 +00:00
parent 73b30201b5
commit 07225fe588
3 changed files with 17 additions and 1 deletions
@@ -21,8 +21,10 @@
*/
#import <Foundation/NSArray.h>
#import <Foundation/NSCalendarDate.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSString.h>
#import <Foundation/NSTimeZone.h>
#import <NGCards/iCalRecurrenceRule.h>
#import <NGCards/iCalRecurrenceCalculator.h>
@@ -107,11 +109,19 @@
NSArray *ranges;
NGCalendarDateRange *checkRange;
NSCalendarDate *endDate;
NSTimeZone *tz;
BOOL doesOccur;
signed daylightOffset;
doesOccur = [self isRecurrent];
if (doesOccur)
{
tz = [occurenceDate timeZone];
if ([tz isDaylightSavingTimeForDate: occurenceDate] != [tz isDaylightSavingTimeForDate: [self startDate]]) {
daylightOffset = [tz secondsFromGMTForDate: occurenceDate] - [tz secondsFromGMTForDate: [self startDate]];
occurenceDate = [occurenceDate dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 seconds: daylightOffset];
}
endDate = [occurenceDate addTimeInterval: [self occurenceInterval]];
checkRange = [NGCalendarDateRange calendarDateRangeWithStartDate: occurenceDate
endDate: endDate];