Single day all day appointments in .ics files

后端 未结 8 1970
一向
一向 2021-01-01 09:44

I\'m creating an ics file using ASP.NET for importing holiday into Outlook 2007 and trying to set the all-day-event flag. This works fine on multi-day holidays, but for sing

8条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-01 10:13

    I just changed the way the date was formatted and it worked for me.

    Eg. I had this:

    DTSTART: " . date(ICAL_FORMAT, strtotime($event->date)) . "
    DTEND:" . date(ICAL_FORMAT, strtotime($event->date)) . "
    

    Changed to:

    DTSTART:" . date('Ymd', strtotime($event->date)) . "
    DTSTAMP:" . date('Ymd', strtotime($event->created_at)) . "
    

提交回复
热议问题