# HG changeset patch # User Paul Boddie # Date 1423520551 -3600 # Node ID c5f6b59023736d7aadc8687cafca5e7dc858e69e # Parent 22a5023b2794f051215d78b8be24fdd647f636e1 Removed TZID usage where free/busy information has been received. diff -r 22a5023b2794 -r c5f6b5902373 imiptools/content.py --- a/imiptools/content.py Mon Feb 09 22:18:38 2015 +0100 +++ b/imiptools/content.py Mon Feb 09 23:22:31 2015 +0100 @@ -176,7 +176,7 @@ update_freebusy(freebusy, attendee, periods, self.obj.get_value("TRANSP"), self.uid, self.store) - def update_freebusy_from_participant(self, user, participant_item, tzid): + def update_freebusy_from_participant(self, user, participant_item): """ For the given 'user', record the free/busy information for the @@ -191,27 +191,27 @@ if participant_attr.get("PARTSTAT") != "DECLINED": update_freebusy_for_other(freebusy, user, participant, - self.obj.get_periods_for_freebusy(tzid), + self.obj.get_periods_for_freebusy(tzid=None), self.obj.get_value("TRANSP"), self.uid, self.store) else: self.remove_from_freebusy_for_other(freebusy, user, participant) - def update_freebusy_from_organiser(self, attendee, organiser_item, tzid=None): + def update_freebusy_from_organiser(self, attendee, organiser_item): """ For the 'attendee', record free/busy information from the 'organiser_item' (a value plus attributes). """ - self.update_freebusy_from_participant(attendee, organiser_item, tzid) + self.update_freebusy_from_participant(attendee, organiser_item) - def update_freebusy_from_attendees(self, organiser, attendees, tzid=None): + def update_freebusy_from_attendees(self, organiser, attendees): "For the 'organiser', record free/busy information from 'attendees'." for attendee_item in attendees.items(): - self.update_freebusy_from_participant(organiser, attendee_item, tzid) + self.update_freebusy_from_participant(organiser, attendee_item) def can_schedule(self, freebusy, periods): return can_schedule(freebusy, periods, self.uid) diff -r 22a5023b2794 -r c5f6b5902373 imiptools/data.py --- a/imiptools/data.py Mon Feb 09 22:18:38 2015 +0100 +++ b/imiptools/data.py Mon Feb 09 23:22:31 2015 +0100 @@ -321,6 +321,11 @@ def get_periods_for_freebusy(obj, periods, tzid): + """ + Get free/busy-compliant periods employed by 'obj' from the given 'periods', + using the indicated 'tzid' to convert dates to datetimes. + """ + start, start_attr = obj.get_datetime_item("DTSTART") end, end_attr = obj.get_datetime_item("DTEND")