1.1 --- a/imipweb/resource.py Mon May 18 00:26:37 2015 +0200
1.2 +++ b/imipweb/resource.py Mon May 18 00:28:53 2015 +0200
1.3 @@ -23,7 +23,7 @@
1.4 from imiptools.client import Client
1.5 from imiptools.data import get_uri, get_window_end, Object, uri_values
1.6 from imiptools.dates import format_datetime, format_time, get_recurrence_start, \
1.7 - to_recurrence_start
1.8 + get_recurrence_start_point, to_recurrence_start_point
1.9 from imiptools.period import FreeBusyPeriod, \
1.10 remove_period, remove_affected_period, update_freebusy
1.11 from imipweb.env import CGIEnvironment
1.12 @@ -149,7 +149,7 @@
1.13 recurrenceid,
1.14 obj.get_value("SUMMARY"),
1.15 obj.get_value("ORGANIZER"),
1.16 - self.get_tzid()
1.17 + p.get_tzid()
1.18 ))
1.19 return summary
1.20
1.21 @@ -157,16 +157,18 @@
1.22
1.23 def is_replaced(self, period, recurrenceids):
1.24 for s in recurrenceids:
1.25 - dt = get_recurrence_start(s, self.get_tzid())
1.26 - if period.get_start() == dt:
1.27 + d = get_recurrence_start(s)
1.28 + dt = get_recurrence_start_point(s, self.get_tzid())
1.29 + if period.get_start() == d or period.get_start_point() == dt:
1.30 return s
1.31 return None
1.32
1.33 def is_affected(self, period, recurrenceid):
1.34 if not recurrenceid:
1.35 return None
1.36 - dt = get_recurrence_start(recurrenceid, self.get_tzid())
1.37 - if period.get_start() == dt:
1.38 + d = get_recurrence_start(recurrenceid)
1.39 + dt = get_recurrence_start_point(recurrenceid, self.get_tzid())
1.40 + if period.get_start() == d or period.get_start_point() == dt:
1.41 return recurrenceid
1.42 return None
1.43
1.44 @@ -221,9 +223,10 @@
1.45
1.46 # Subtract any recurrences from the free/busy details of a parent
1.47 # object.
1.48 + # NOTE: The time zone may need obtaining using the object details.
1.49
1.50 for recurrenceid in self._get_recurrences(uid):
1.51 - remove_affected_period(freebusy, uid, to_recurrence_start(recurrenceid))
1.52 + remove_affected_period(freebusy, uid, to_recurrence_start_point(recurrenceid, self.get_tzid()))
1.53
1.54 self.store.set_freebusy(self.user, freebusy)
1.55 self.publish_freebusy(freebusy)