[CalendarServer-changes] [5212] CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py
source_changes at macosforge.org
source_changes at macosforge.org
Wed Feb 24 21:04:13 PST 2010
Revision: 5212
http://trac.macosforge.org/projects/calendarserver/changeset/5212
Author: wsanchez at apple.com
Date: 2010-02-24 21:04:10 -0800 (Wed, 24 Feb 2010)
Log Message:
-----------
Use timerange
Modified Paths:
--------------
CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py
Modified: CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py 2010-02-25 04:46:14 UTC (rev 5211)
+++ CalendarServer/trunk/twistedcaldav/scheduling/icaldiff.py 2010-02-25 05:04:10 UTC (rev 5212)
@@ -15,10 +15,9 @@
##
from twext.python.log import Logger
-from twext.python.datetime import asUTC, iCalendarString
+from twext.python.datetime import timerange, asUTC, iCalendarString
from twistedcaldav.config import config
-from twistedcaldav.dateops import normalizeStartEndDuration
from twistedcaldav.ical import Component, Property
from twistedcaldav.scheduling.cuaddress import normalizeCUAddr
from twistedcaldav.scheduling.itip import iTipGenerator
@@ -554,10 +553,10 @@
dtend = component.getProperty("DTEND")
duration = component.getProperty("DURATION")
- newdtstart, newdtend = normalizeStartEndDuration(
- dtstart.value() if dtstart is not None else None,
- dtend.value() if dtend is not None else None,
- duration.value() if duration is not None else None,
+ timeRange = timerange(
+ start = dtstart.value() if dtstart is not None else None,
+ end = dtend.value() if dtend is not None else None,
+ duration = duration.value() if duration is not None else None,
)
newdue = None
@@ -566,13 +565,12 @@
duration = component.getProperty("DURATION")
if dtstart or duration:
- newdtstart, newdtend = normalizeStartEndDuration(
- dtstart.value() if dtstart is not None else None,
- None,
- duration.value() if duration is not None else None,
+ timeRange = timerange(
+ start = dtstart.value() if dtstart is not None else None,
+ duration = duration.value() if duration is not None else None,
)
else:
- newdtstart = newdtend = None
+ timeRange = timerange()
newdue = component.getProperty("DUE")
if newdue is not None:
@@ -599,7 +597,7 @@
for exdate in exdates:
newexdates.update([asUTC(value) for value in exdate.value()])
- return newdtstart, newdtend, newdue, newrrules, newrdates, newexdates
+ return timeRange.start(), timeRange.end(), newdue, newrrules, newrdates, newexdates
def _transferProperty(self, propName, serverComponent, clientComponent):
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100224/572820a5/attachment.html>
More information about the calendarserver-changes
mailing list