1.1 --- a/imiptools/dates.py Tue Feb 03 23:40:24 2015 +0100
1.2 +++ b/imiptools/dates.py Wed Feb 04 14:53:47 2015 +0100
1.3 @@ -85,14 +85,14 @@
1.4 else:
1.5 return dt.strftime("%Y%m%d")
1.6
1.7 -def get_datetime_item(dt):
1.8 +def get_datetime_item(dt, tzid):
1.9
1.10 - "Return an iCalendar-compatible string and attributes for 'dt'."
1.11 + "Return an iCalendar-compatible string and attributes for 'dt' and 'tzid'."
1.12
1.13 if not dt:
1.14 return None, None
1.15 value = format_datetime(dt)
1.16 - attr = isinstance(dt, datetime) and {"TZID" : dt.tzname(), "VALUE" : "DATE-TIME"} or {"VALUE" : "DATE"}
1.17 + attr = isinstance(dt, datetime) and {"TZID" : tzid, "VALUE" : "DATE-TIME"} or {"VALUE" : "DATE"}
1.18 return value, attr
1.19
1.20 def get_datetime(value, attr=None):