[CalendarServer-changes] [7492] CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py
source_changes at macosforge.org
source_changes at macosforge.org
Tue May 17 12:46:45 PDT 2011
Revision: 7492
http://trac.macosforge.org/projects/calendarserver/changeset/7492
Author: cdaboo at apple.com
Date: 2011-05-17 12:46:45 -0700 (Tue, 17 May 2011)
Log Message:
-----------
Fix EXDATE problem after two cancels in a recurring event.
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py
Modified: CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py 2011-05-17 19:45:43 UTC (rev 7491)
+++ CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py 2011-05-17 19:46:45 UTC (rev 7492)
@@ -283,7 +283,7 @@
# Get all EXDATEs in UTC
exdates = set()
for exdate in master.properties("EXDATE"):
- exdates.update([value.getValue().adjustToUTC() for value in exdate.value()])
+ exdates.update([value.getValue().duplicate().adjustToUTC() for value in exdate.value()])
return exdates, map, master
@@ -347,7 +347,9 @@
overridden = self.newCalendar.overriddenComponent(rid)
self.newCalendar.removeComponent(overridden)
if self.newMaster:
- self.newMaster.addProperty(Property("EXDATE", [rid,]))
+ # Use the original R-ID value so we preserve the timezone
+ original_rid = component.propertyValue("RECURRENCE-ID")
+ self.newMaster.addProperty(Property("EXDATE", [original_rid,]))
# Derive a new component in the new calendar for each new one in setnew
for key in setnew - setold:
@@ -578,7 +580,7 @@
newdue = component.getProperty("DUE")
if newdue is not None:
- newdue.value().adjustToUTC()
+ newdue = newdue.value().duplicate().adjustToUTC()
# Recurrence rules - we need to normalize the order of the value parts
newrrules = set()
@@ -595,14 +597,14 @@
for rdate in rdates:
for value in rdate.value():
if isinstance(PyCalendarDateTime()):
- value.adjustToUTC()
+ value = value.duplicate().adjustToUTC()
newrdates.add(value)
# EXDATEs
newexdates = set()
exdates = component.properties("EXDATE")
for exdate in exdates:
- newexdates.update([value.getValue().adjustToUTC() for value in exdate.value()])
+ newexdates.update([value.getValue().duplicate().adjustToUTC() for value in exdate.value()])
return timeRange.getStart(), timeRange.getEnd(), newdue, newrrules, newrdates, newexdates
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20110517/9183d9cf/attachment.html>
More information about the calendarserver-changes
mailing list