1.1 --- a/imip_manager.py Tue Feb 03 23:40:24 2015 +0100
1.2 +++ b/imip_manager.py Wed Feb 04 14:53:47 2015 +0100
1.3 @@ -424,8 +424,8 @@
1.4 start = get_datetime(start, {"TZID" : tzid})
1.5 end = end and get_datetime(end, {"TZID" : tzid}) or get_start_of_next_day(start, tzid)
1.6
1.7 - start_value, start_attr = get_datetime_item(start)
1.8 - end_value, end_attr = get_datetime_item(end)
1.9 + start_value, start_attr = get_datetime_item(start, tzid)
1.10 + end_value, end_attr = get_datetime_item(end, tzid)
1.11
1.12 # Create a calendar object and store it as a request.
1.13
2.1 --- a/imiptools/dates.py Tue Feb 03 23:40:24 2015 +0100
2.2 +++ b/imiptools/dates.py Wed Feb 04 14:53:47 2015 +0100
2.3 @@ -85,14 +85,14 @@
2.4 else:
2.5 return dt.strftime("%Y%m%d")
2.6
2.7 -def get_datetime_item(dt):
2.8 +def get_datetime_item(dt, tzid):
2.9
2.10 - "Return an iCalendar-compatible string and attributes for 'dt'."
2.11 + "Return an iCalendar-compatible string and attributes for 'dt' and 'tzid'."
2.12
2.13 if not dt:
2.14 return None, None
2.15 value = format_datetime(dt)
2.16 - attr = isinstance(dt, datetime) and {"TZID" : dt.tzname(), "VALUE" : "DATE-TIME"} or {"VALUE" : "DATE"}
2.17 + attr = isinstance(dt, datetime) and {"TZID" : tzid, "VALUE" : "DATE-TIME"} or {"VALUE" : "DATE"}
2.18 return value, attr
2.19
2.20 def get_datetime(value, attr=None):