Google Calendar ICS文件多事件导入不起作用

时间:2018-08-14 13:42:03

标签: google-calendar-api icalendar vcalendar

我尝试了每个示例和每个在网上找到的解决方案,并且无法获取ICS文件将事件导入到Google日历中,只有在存在多个事件的情况下。这适用于Google日历的一个事件,但不适用于2个或更多事件。我有一个要用于自动导入事件的客户端动态URL,但是我需要首先使文件导入生效。

您能提供的任何帮助将不胜感激。我完全没有主意。

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Columbus Commons//Our Events//EN
METHOD:PUBLISH
X-WR-TIMEZONE:America/New_York
X-WR-CALNAME:Columbus Commons
CALSCALE:GREGORIAN
BEGIN:VEVENT
DTSTART:20180929T120000
DTEND:20180929T160000
DTSTAMP:20180929T120000
UID:event-2
LOCATION:Columbus Commons, Columbus, Ohio
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Harvest Fair
DESCRIPTION:Celebrate the very best of fall with the Columbus Commons. Families gather Downtown to take in games, entertainment, a pumpkin patch, and seasonal craft creations. Enjoy the many free activities or buy a budget-friendly $5 wristband to jump on the inflatables.
For more information, click here!
TRANSP:OPAQUE
END:VEVENT
BEGIN:VEVENT
DTSTART:20180501T171500
DTEND:20180604T181500
DTSTAMP:20180501T171500
UID:event-8
LOCATION:Columbus Commons, Columbus, Ohio
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Commons Cardio
DESCRIPTION:Want to get a fun, upbeat full body workout in? This class concentrates on longer cardiovascular component interspaced with shorter intervals for body-weight challenges.
This class is provided free of charge thanks to UnitedHealthcare. All participants must fill out a waiver. 
View the full fitness schedule here. 
TRANSP:OPAQUE
END:VEVENT
END:VCALENDAR

1 个答案:

答案 0 :(得分:0)

好的,所以我在发布此消息后不久找到了答案。问题在于,DESCRIPTION信息是通过多行发布的。使用php删除换行符以将其全部保留在一行中即可解决该问题。