Adding recurring event to Google Calendar via XML

本小妞迷上赌 提交于 2019-12-03 17:10:14

Two things:

  1. Your timezone section isn't valid - I believe each property should be on a line on its own.

  2. Your "UNTIL" should be a UTC time. From RFC2445:

If specified as a date-time value, then it MUST be specified in an UTC time format.

So here's a complete example, having adjusted the local time to UTC for the "until" part, and expanded the time zone:

DTSTART;TZID=America/Los_Angeles:20090824T080000
DTEND;TZID=America/Los_Angeles:20090824T090000 
RRULE:FREQ=DAILY;WKST=SU;UNTIL=20090828T160000Z
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles 
BEGIN:DAYLIGHT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:PDT
DTSTART:19700308T020000 
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU 
END:DAYLIGHT 
BEGIN:STANDARD
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
TZNAME:PST
DTSTART:19701101T020000 
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU 
END:STANDARD 
END:VTIMEZONE

I have a sneaking suspicion this may have been a recent change.

Alternatively, you might want to try omitting the VTIMEZONE section entirely - just supply the TZID, which should be an ID that you know Google Calendar supports. For example:

DTSTART;TZID=America/Los_Angeles:20090824T080000
DTEND;TZID=America/Los_Angeles:20090824T090000 
RRULE:FREQ=DAILY;WKST=SU;UNTIL=20090828T160000Z
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!