imip-agent

Change of imiptools/data.py

628:afeefc78e8ea
imiptools/data.py
     1.1 --- a/imiptools/data.py	Sat Aug 01 01:35:03 2015 +0200
     1.2 +++ b/imiptools/data.py	Sat Aug 01 18:24:32 2015 +0200
     1.3 @@ -25,7 +25,7 @@
     1.4  from imiptools.dates import format_datetime, get_datetime, \
     1.5                              get_datetime_item as get_item_from_datetime, \
     1.6                              get_datetime_tzid, \
     1.7 -                            get_duration, get_period, \
     1.8 +                            get_duration, get_period, get_period_item, \
     1.9                              get_recurrence_start_point, \
    1.10                              get_tzid, to_datetime, to_timezone, to_utc_datetime
    1.11  from imiptools.period import Period, RecurringPeriod, period_overlaps
    1.12 @@ -65,6 +65,9 @@
    1.13          if not self.has_key("RECURRENCE-ID"):
    1.14              return None
    1.15          dt, attr = self.get_datetime_item("RECURRENCE-ID")
    1.16 +
    1.17 +        # Coerce any date to a UTC datetime if TZID was specified.
    1.18 +
    1.19          tzid = attr.get("TZID")
    1.20          if tzid:
    1.21              dt = to_timezone(to_datetime(dt, tzid), "UTC")