iCal文件无法导入

时间:2013-11-29 13:22:36

标签: icalendar

我在python脚本中创建了一个函数,它返回一个ical文件,但是当我尝试将它导入到busycal时,它说“没有导入事件”。我已经检查并进行了双重检查,但我发现它没有任何问题。以下是此类iCal文件的(简短)示例:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ben//classtoical
X-WR-CALNAME:Classes
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-50157600408285@mydomain.com
DTSTART;TZID=Europe/Berlin:20131204T18000
DTEND;TZID=Europe/Berlin:20131204T20000
SUMMARY:Contemporary Philosophy
LOCATION:F.4.113
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-79836541033229@mydomain.com
DTSTART;TZID=Europe/Berlin:20131202T18000
DTEND;TZID=Europe/Berlin:20131202T20000
SUMMARY:Logic and Philosophy of Science
LOCATION:E.2.01
END:VEVENT
END:VCALENDAR

1 个答案:

答案 0 :(得分:0)

我发现了问题的原因; DTSTART和DTEND日期只有1个零表示秒而不是所需的2。

原始档案:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ben//classtoical
X-WR-CALNAME:Classes
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-50157600408285@mydomain.com
DTSTART;TZID=Europe/Berlin:20131204T18000
DTEND;TZID=Europe/Berlin:20131204T20000
SUMMARY:Contemporary Philosophy
LOCATION:F.4.113
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-79836541033229@mydomain.com
DTSTART;TZID=Europe/Berlin:20131202T18000
DTEND;TZID=Europe/Berlin:20131202T20000
SUMMARY:Logic and Philosophy of Science
LOCATION:E.2.01
END:VEVENT
END:VCALENDAR

工作档案:

BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Ben//classtoical
X-WR-CALNAME:Classes
X-WR-TIMEZONE:Europe/Berlin
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-50157600408285@mydomain.com
DTSTART;TZID=Europe/Berlin:20131204T180000
DTEND;TZID=Europe/Berlin:20131204T200000
SUMMARY:Contemporary Philosophy
LOCATION:F.4.113
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20131129T141052Z
UID:20131129141052-79836541033229@mydomain.com
DTSTART;TZID=Europe/Berlin:20131202T180000
DTEND;TZID=Europe/Berlin:20131202T200000
SUMMARY:Logic and Philosophy of Science
LOCATION:E.2.01
END:VEVENT
END:VCALENDAR