all repos — mycal @ 02602b26789034acb4da4a3478e57cfddc75e636

private calendar anonymiser

encode dtstamp differently for go compatibility

Alan Pearce
commit

02602b26789034acb4da4a3478e57cfddc75e636

parent

76e603b93852f2c1fab4772c7b8813959767e42f

1 file changed, 1 insertion(+), 2 deletions(-)

changed files
M mycal.pymycal.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: