Revision: 1441 http://trac.macosforge.org/projects/calendarserver/changeset/1441 Author: cdaboo@apple.com Date: 2007-04-01 20:34:41 -0700 (Sun, 01 Apr 2007) Log Message: ----------- We need the dates stored in the index to all be relative to utc - even the floating ones, as we always run a query comparing against a utc formatted datetime. Modified Paths: -------------- CalendarServer/branches/users/cdaboo/fast-multiget-1425/twistedcaldav/index.py Modified: CalendarServer/branches/users/cdaboo/fast-multiget-1425/twistedcaldav/index.py =================================================================== --- CalendarServer/branches/users/cdaboo/fast-multiget-1425/twistedcaldav/index.py 2007-04-02 03:32:30 UTC (rev 1440) +++ CalendarServer/branches/users/cdaboo/fast-multiget-1425/twistedcaldav/index.py 2007-04-02 03:34:41 UTC (rev 1441) @@ -44,6 +44,8 @@ from twistedcaldav.query import calendarquery from twistedcaldav import caldavxml +from vobject.icalendar import utc + db_basename = ".db.sqlite" schema_version = "4" collection_types = {"Calendar": "Regular Calendar Collection", "iTIP": "iTIP Calendar Collection"} @@ -548,12 +550,14 @@ instances = calendar.expandTimeRanges(expand_max) for key in instances: instance = instances[key] + start = instance.start.replace(tzinfo=utc) + end = instance.end.replace(tzinfo=utc) float = ('N', 'Y')[instance.start.tzinfo is None] self._db_execute( """ insert into TIMESPAN (NAME, FLOAT, START, END) values (:1, :2, :3, :4) - """, name, float, normalizeForIndex(instance.start), normalizeForIndex(instance.end) + """, name, float, start, end ) self._db_execute(
participants (1)
-
source_changes@macosforge.org