mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-16 10:48:50 +00:00
Monotone-Parent: ebe63ce53628359dd83606f2bb756f112a053f66
Monotone-Revision: 49a09455a4649cc47dfc143047a9635ce2974e57 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-02-11T19:48:09 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -67,20 +67,34 @@
|
||||
tz = [ud timeZone];
|
||||
start = [event startDate];
|
||||
[start setTimeZone: tz];
|
||||
|
||||
newStart = [start dateByAddingYears: 0 months: 0
|
||||
days: [daysDelta intValue]
|
||||
hours: 0 minutes: [startDelta intValue]
|
||||
seconds: 0];
|
||||
end = [event endDate];
|
||||
[end setTimeZone: tz];
|
||||
|
||||
newDuration = ([end timeIntervalSinceDate: start]
|
||||
+ [durationDelta intValue] * 60);
|
||||
newEnd = [newStart addTimeInterval: newDuration];
|
||||
if ([event isAllDay])
|
||||
{
|
||||
newStart = [start dateByAddingYears: 0 months: 0
|
||||
days: [daysDelta intValue]
|
||||
hours: 0 minutes: 0
|
||||
seconds: 0];
|
||||
newDuration = (((float) abs ([end timeIntervalSinceDate: start])
|
||||
+ [durationDelta intValue] * 60)
|
||||
/ 86400);
|
||||
[event setAllDayWithStartDate: newStart duration: newDuration];
|
||||
}
|
||||
else
|
||||
{
|
||||
newStart = [start dateByAddingYears: 0 months: 0
|
||||
days: [daysDelta intValue]
|
||||
hours: 0 minutes: [startDelta intValue]
|
||||
seconds: 0];
|
||||
|
||||
[event setStartDate: newStart];
|
||||
[event setEndDate: newEnd];
|
||||
newDuration = ([end timeIntervalSinceDate: start]
|
||||
+ [durationDelta intValue] * 60);
|
||||
newEnd = [newStart addTimeInterval: newDuration];
|
||||
|
||||
[event setStartDate: newStart];
|
||||
[event setEndDate: newEnd];
|
||||
}
|
||||
[co saveComponent: event];
|
||||
|
||||
response = [self responseWith204];
|
||||
|
||||
Reference in New Issue
Block a user