zaheer - in flumotion/trunk: . flumotion/component/base
flumotion-commit at lists.fluendo.com
flumotion-commit at lists.fluendo.com
Thu Jun 14 13:58:59 CEST 2007
Author: zaheer
Date: Thu Jun 14 13:58:56 2007
New Revision: 5177
Modified:
flumotion/trunk/ChangeLog
flumotion/trunk/flumotion/component/base/scheduler.py
Log:
* flumotion/component/base/scheduler.py (Event.__init__,
ICalScheduler.parseCalendar):
Fix where we have a recurrence rule with dtstart/dtend with non
UTC timezone.
Fixes #673
Fix debug statement.
Modified: flumotion/trunk/ChangeLog
==============================================================================
--- flumotion/trunk/ChangeLog (original)
+++ flumotion/trunk/ChangeLog Thu Jun 14 13:58:56 2007
@@ -1,3 +1,12 @@
+2007-06-14 Zaheer Abbas Merali <zaheerabbas at merali dot org>
+
+ * flumotion/component/base/scheduler.py (Event.__init__,
+ ICalScheduler.parseCalendar):
+ Fix where we have a recurrence rule with dtstart/dtend with non
+ UTC timezone.
+ Fixes #673
+ Fix debug statement.
+
2007-06-13 Michael Smith <msmith at fluendo.com>
* flumotion/admin/gtk/client.py:
Modified: flumotion/trunk/flumotion/component/base/scheduler.py
==============================================================================
--- flumotion/trunk/flumotion/component/base/scheduler.py (original)
+++ flumotion/trunk/flumotion/component/base/scheduler.py Thu Jun 14 13:58:56 2007
@@ -79,10 +79,18 @@
if recur:
from dateutil import rrule
- startRecurRule = rrule.rrulestr(recur, dtstart=start)
- endRecurRule = rrule.rrulestr(recur, dtstart=end)
if now is None:
now = datetime.now(LOCAL)
+ if end.tzinfo is None:
+ end = datetime(end.year, end.month, end.day, end.hour,
+ end.minute, end.second, end.microsecond, LOCAL)
+ endRecurRule = rrule.rrulestr(recur, dtstart=end)
+ if start.tzinfo is None:
+ start = datetime(start.year, start.month, start.day,
+ start.hour, start.minute, start.second,
+ start.microsecond, LOCAL)
+ startRecurRule = rrule.rrulestr(recur, dtstart=start)
+
if end < now:
end = endRecurRule.after(now)
start = startRecurRule.before(end)
@@ -373,7 +381,8 @@
summary = event.decoded('summary', None)
recur = event.get('rrule', None)
if start and end:
- self.debug("start %r end %r recur %r", start, end, recur)
+ self.debug("start %r tzname %s end %r recur %r", start,
+ start.tzname(), end, recur)
if recur:
e = Event(start, end, summary, recur.ical())
else:
More information about the flumotion-commit
mailing list