skarim / vobject

A full-featured Python package for parsing and creating iCalendar and vCard files
https://vobject.sameenkarim.com
258 stars 93 forks source link

Unable to add VALARM to ical #166

Closed PierreKr closed 3 years ago

PierreKr commented 3 years ago

Hi,

i'm trying to add an reminder to my calendar items but it won't work. I exported the Item to ics-File but VALARM is not added. What am i doing wrong?

Code:

cal = vobject.newFromBehavior('vcalendar') cal = vobject.iCalendar() event = cal.add('vevent') event.add('summary').value = "Test" event.add('dtstart').value = dateutil.parser.parse(card_info['dueAt']) event.add('dtend').value = dateutil.parser.parse(card_info['dueAt'])+ relativedelta(minutes=30) event.add('description').value = "Test123" alarm = event.add('valarm') alarm.add('trigger').value = timedelta(minutes=-15) alarm.add('action').value = "DISPLAY" alarm.add('description').value = "Reminder"

Outlook Export:

BEGIN:VCALENDAR PRODID:-//Microsoft Corporation//Outlook 15.0 MIMEDIR//EN VERSION:2.0 METHOD:PUBLISH X-MS-OLK-FORCEINSPECTOROPEN:TRUE BEGIN:VEVENT CLASS:PUBLIC CREATED:20210408T122537Z DESCRIPTION:Test123 DTEND:20210409T143000Z DTSTAMP:20210408T121727Z DTSTART:20210409T140000Z LAST-MODIFIED:20210408T122537Z SEQUENCE:0 SUMMARY:Test TRANSP:OPAQUE UID:20210408T121727Z - 61863@srv-123 X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//E N">\n\n\n\n\n\n\n\n
\n X-MICROSOFT-CDO-BUSYSTATUS:BUSY X-MS-OLK-AUTOFILLLOCATION:TRUE END:VEVENT END:VCALENDAR

PierreKr commented 3 years ago

Outlook does not support VALARM from ics.