mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-16 04:13:17 +00:00
Monotone-Parent: c36e4dbaaa40c95b58d682bbbe6f0a563275afa1
Monotone-Revision: a0ddb6969a3af4885bc30844a5dc0bcda95a8212 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-03-12T20:24:59 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -276,33 +276,11 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
NSCalendarDate *firstDate;
|
||||
iCalEvent *master;
|
||||
signed int daylightOffset;
|
||||
|
||||
startDate = [event startDate];
|
||||
daylightOffset = 0;
|
||||
|
||||
if ([co isNew] && [co isKindOfClass: [SOGoAppointmentOccurence class]])
|
||||
{
|
||||
// We are creating a new exception in a recurrent event -- compute the daylight
|
||||
// saving time with respect to the first occurrence of the recurrent event.
|
||||
master = (iCalEvent*)[[event parent] firstChildWithTag: @"vevent"];
|
||||
firstDate = [master startDate];
|
||||
|
||||
if ([timeZone isDaylightSavingTimeForDate: startDate] != [timeZone isDaylightSavingTimeForDate: firstDate])
|
||||
{
|
||||
daylightOffset = (signed int)[timeZone secondsFromGMTForDate: firstDate]
|
||||
- (signed int)[timeZone secondsFromGMTForDate: startDate];
|
||||
startDate = [startDate dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:daylightOffset];
|
||||
}
|
||||
}
|
||||
|
||||
isAllDay = [event isAllDay];
|
||||
endDate = [event endDate];
|
||||
if (isAllDay)
|
||||
endDate = [[event endDate] dateByAddingYears: 0 months: 0 days: -1];
|
||||
else
|
||||
endDate = [[event endDate] dateByAddingYears:0 months:0 days:0 hours:0 minutes:0 seconds:daylightOffset];
|
||||
endDate = [endDate dateByAddingYears: 0 months: 0 days: -1];
|
||||
isTransparent = ![event isOpaque];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user