encode dtstamp differently for go compatibility
1 file changed, 1 insertion(+), 2 deletions(-)
changed files
M mycal.py → mycal.py
@@ -81,7 +81,6 @@ for component in input.walk(): if component.name == "VEVENT": dtstart = fixup_date(component.get('dtstart').dt) dtend = fixup_date(component.get('dtend', component.get('dtstart')).dt) - dtstamp = fixup_date(component.get('dtstamp').dt) if dtstart >= start_date and dtend <= end_date: busy = FreeBusy(uid=component.get('uid')) vp = icalendar.prop.vPeriod([ to_utc(d) for d in [dtstart, dtend] ])@@ -93,9 +92,9 @@ vp.FBTYPE = icalendar.enums.FBTYPE.BUSY_UNAVAILABLE busy.add('freebusy', vp) busy.add('summary', f'{config.name} Busy') + busy.add('dtstamp', component.get('dtstamp', icalendar.prop.vDatetime(datetime.now(tz)))) busy.add('dtstart', dtstart) busy.add('dtend', dtend) - busy.add('dtstamp', dtstamp) output.add_component(busy) return output.to_ical(), { "Content-Type": "text/plain" } except Exception as e: