[CalendarServer-changes] [5210] CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py

source_changes at macosforge.org source_changes at macosforge.org
Wed Feb 24 20:45:32 PST 2010


Revision: 5210
          http://trac.macosforge.org/projects/calendarserver/changeset/5210
Author:   wsanchez at apple.com
Date:     2010-02-24 20:45:31 -0800 (Wed, 24 Feb 2010)
Log Message:
-----------
Use iCalendarString()

Modified Paths:
--------------
    CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py

Modified: CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py
===================================================================
--- CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py	2010-02-25 04:34:51 UTC (rev 5209)
+++ CalendarServer/trunk/twistedcaldav/scheduling/scheduler.py	2010-02-25 04:45:31 UTC (rev 5210)
@@ -14,38 +14,41 @@
 # limitations under the License.
 ##
 
-from twext.python.log import Logger, LoggingMixIn
-from twext.web2.dav.http import ErrorResponse
+import itertools
+import re
+import socket
+import urlparse
 
 from twisted.internet.defer import inlineCallbacks, returnValue
 from twisted.python.failure import Failure
+
+from twext.python.log import Logger, LoggingMixIn
+from twext.python.datetime import iCalendarString
 from twext.web2 import responsecode
+from twext.web2.http import HTTPError, Response, StatusResponse
+from twext.web2.http_headers import MimeType
 from twext.web2.dav import davxml
 from twext.web2.dav.http import errorForFailure, messageForFailure, statusForFailure
-from twext.web2.http import HTTPError, Response, StatusResponse
-from twext.web2.http_headers import MimeType
+from twext.web2.dav.http import ErrorResponse
 
-from twistedcaldav import caldavxml, dateops
+from twistedcaldav import caldavxml
+from twistedcaldav.caldavxml import caldav_namespace
+from twistedcaldav.customxml import calendarserver_namespace
 from twistedcaldav.accounting import accountingEnabled, emitAccounting
-from twistedcaldav.caldavxml import caldav_namespace, TimeRange
 from twistedcaldav.config import config
-from twistedcaldav.customxml import calendarserver_namespace
 from twistedcaldav.ical import Component
 from twistedcaldav.scheduling import addressmapping
 from twistedcaldav.scheduling.caldav import ScheduleViaCalDAV
-from twistedcaldav.scheduling.cuaddress import InvalidCalendarUser,\
-    LocalCalendarUser, RemoteCalendarUser, EmailCalendarUser,\
-    PartitionedCalendarUser
+from twistedcaldav.scheduling.cuaddress import InvalidCalendarUser
+from twistedcaldav.scheduling.cuaddress import LocalCalendarUser
+from twistedcaldav.scheduling.cuaddress import RemoteCalendarUser
+from twistedcaldav.scheduling.cuaddress import EmailCalendarUser
+from twistedcaldav.scheduling.cuaddress import PartitionedCalendarUser
 from twistedcaldav.scheduling.imip import ScheduleViaIMip
 from twistedcaldav.scheduling.ischedule import ScheduleViaISchedule
 from twistedcaldav.scheduling.ischeduleservers import IScheduleServers
 from twistedcaldav.scheduling.itip import iTIPRequestStatus
 
-import itertools
-import re
-import socket
-import urlparse
-
 """
 CalDAV/Server-to-Server scheduling behavior.
 """
@@ -324,7 +327,7 @@
                     log.err("VFREEBUSY start or end not UTC: %s" % (self.calendar,))
                     raise HTTPError(ErrorResponse(responsecode.FORBIDDEN, (caldav_namespace, "valid-calendar-data"), description="VFREEBUSY start or end not UTC"))
 
-                self.timeRange = TimeRange(start=dateops.toString(dtstart), end=dateops.toString(dtend))
+                self.timeRange = caldavxml.TimeRange(start=iCalendarString(dtstart), end=iCalendarString(dtend))
                 self.timeRange.start = dtstart
                 self.timeRange.end = dtend
         
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20100224/0a4da528/attachment.html>


More information about the calendarserver-changes mailing list