1.1 --- a/imiptools/data.py Sat May 16 01:03:51 2015 +0200
1.2 +++ b/imiptools/data.py Sat May 16 18:09:37 2015 +0200
1.3 @@ -180,12 +180,14 @@
1.4
1.5 # Write the limits of the resource.
1.6
1.7 - rwrite(("DTSTART", {"VALUE" : "DATE-TIME"}, periods[0].start))
1.8 - rwrite(("DTEND", {"VALUE" : "DATE-TIME"}, periods[-1].end))
1.9 + rwrite(("DTSTART", {"VALUE" : "DATE-TIME"}, format_datetime(periods[0].get_start())))
1.10 + rwrite(("DTEND", {"VALUE" : "DATE-TIME"}, format_datetime(periods[-1].get_end())))
1.11
1.12 for p in periods:
1.13 if p.transp == "OPAQUE":
1.14 - rwrite(("FREEBUSY", {"FBTYPE" : "BUSY"}, "/".join([p.start, p.end])))
1.15 + rwrite(("FREEBUSY", {"FBTYPE" : "BUSY"}, "/".join(
1.16 + map(format_datetime, [p.get_start(), p.get_end()])
1.17 + )))
1.18
1.19 return ("VFREEBUSY", {}, record)
1.20
1.21 @@ -540,9 +542,7 @@
1.22 # Create a new period for free/busy purposes with the converted
1.23 # datetime information.
1.24
1.25 - l.append(p.__class__(
1.26 - *((format_datetime(start), format_datetime(end)) + p.as_tuple()[2:])
1.27 - ))
1.28 + l.append(p.__class__(start, end, *p.as_tuple()[2:]))
1.29
1.30 return l
1.31