Including a LOCATION field in an .ics calendar file stops Calendar on MacOS El Capitan communicating with Exchange Server

好久不见. 提交于 2019-12-25 09:47:52

问题


This question relates to a question I asked previously (Importing .ics into Calendar on Mac (El Capitan) breaks connection to Exchange Server). I have written a Python script to generate an .ics file that can be used to transfer calendar events into an Exchange calendar in the Calendar app on MacOSX (El Capitan). The .ics file produced validates using http://severinghaus.org/projects/icv/. The events are imported into a separate calendar rather than into the default Exchange calendar and appear in Calendar as expected. However, after importing the events, Calendar is unable to sync the events to Exchange Server. This is particularly noticeable if I try to add an invitee; immediately, I get an error message saying that:

Calendar can’t save the event “event name” to the Exchange server.
There was an error attempting to send your changes to the exchange server.

After lots of faffing around, it seems that including a LOCATION field in the .ics file stops Calendar communicating with Exchange Server.

So, for example, the following .ics file will import an event into an Exchange calendar (perhaps called 'tempcal') in the Calendar app but the event isn't synced with the Exchange server and I can't then add an invitee:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Python iCalendar timetable//
BEGIN:VEVENT
SUMMARY:COURSE XYZ 2016-17 LECTURE 1
DTSTART;TZID=Europe/London;VALUE=DATE-TIME:20161011T160000
DTEND;TZID=Europe/London;VALUE=DATE-TIME:20161011T170000
DTSTAMP;VALUE=DATE-TIME:20160923T021716Z
UID:20161011160000/Introduction to my course@example.com
LOCATION:TBA
END:VEVENT
END:VCALENDAR

...whereas the following .ics file works fine:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Python iCalendar timetable//
BEGIN:VEVENT
SUMMARY:COURSE XYZ 2016-17 LECTURE 1
DTSTART;TZID=Europe/London;VALUE=DATE-TIME:20161011T160000
DTEND;TZID=Europe/London;VALUE=DATE-TIME:20161011T170000
DTSTAMP;VALUE=DATE-TIME:20160923T021716Z
UID:20161011160000/Introduction to my course@example.com
END:VEVENT
END:VCALENDAR

This seems like utter madness from where I'm standing. Can anyone offer an explanation of what's going on? Perhaps more importantly, is there anything I can do to sort this out at my end (i.e. on the Mac) or do I need to get IT Support to sort is out at the Exchange Server end (and, if so, what should they do?)


回答1:


Not sure if this will help, but the validator at http://icalendar.org/validator.html complains about an invalid TZID value. The "Europe/London" timezone needs to be defined in a VTIMEZONE section.

The other thing to verify is at the end of every line has a CR LF, which is a requirement for the icalendar standard.



来源:https://stackoverflow.com/questions/39678514/including-a-location-field-in-an-ics-calendar-file-stops-calendar-on-macos-el-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!