我通过PHP& amp;生成了ICS文件。 JS。
BEGIN:VCALENDAR
VERSION:2.0
PRODID:https://www.google.com/
CALSCALE:GREGORIAN
TZ:+00
BEGIN:VEVENT
UID:https://www.google.com/
DTSTAMP:20180308T140833Z
DTSTART;VALUE=DATE:20180308
DTEND;VALUE=DATE:20180312
SUMMARY:"Hamlet"
X-ALT-DESC;FMTTYPE=text/html:<!DOCTYPE HTML><HTML><BODY>Show Times:<br/>March 8-11, 2018 @ 7:30 pm<br/> March 12, 2018 @ 2:00 pm<br/>Often dubbed the “Greatest Play Ever Written” and written by the most produced playwright each year, William Shakespeare, the titular Hamlet.<br/><a href=https://www.whittierevents.com/events/hamlet/>https://www.whittierevents.com/events/hamlet/</a></BODY></HTML>
LOCATION:6760 Painter Ave, Whittier, CA 90601
END:VEVENT
END:VCALENDAR
当我在outlook中导入此文件时,虽然是3月12日,但结束日期显示为3月11日。 我该如何解决这个问题?
答案 0 :(得分:1)
根据规范,allday事件的结束是第二天的开始。因此,ics文件中的1天事件将有2个日期 - DTEND将是DTSTART之后的第二天。所以在我们的例子中,为了使它看起来像应用程序中的第12个结尾,.ics文件必须说是第13个。另请参阅Exclusive/Inclusive DTEND according to RFC5545 and Fullcalendar in event with time part, how to do it right?