Single day all day appointments in .ics files

后端 未结 8 2022
一向
一向 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:08

    Leaving this here for anyone else Googling.. I had trouble with the same, mix of all day events and half days particularly in Google Calendar.

    My problem was related to how the ICS file was being force downloaded. sounds silly, but a header that forced download, prevented Google calendar from properly parsing all day events. Streaming to the browser had better results. Sample output here. (use VALUE=DATE) for single all day events.

    BEGIN:VEVENT
    UID:1248
    DTSTART;VALUE=DATE:20151218
    DTEND;VALUE=DATE:20151219
    DTSTAMP:20151218T080000Z
    CREATED:20151212T200409Z
    DESCRIPTION:examplea
    LAST-MODIFIED:20151218T080000Z
    LOCATION:
    SUMMARY:example summary
    SEQUENCE:0
    STATUS:CONFIRMED
    TRANSP:OPAQUE
    END:VEVENT
    BEGIN:VEVENT
    UID:1249
    DTSTART;VALUE=DATE:20151217
    DTEND;VALUE=DATE:20151218
    DTSTAMP:20151217T080000Z
    CREATED:20151212T200409Z
    DESCRIPTION:example1
    LAST-MODIFIED:20151217T080000Z
    LOCATION:
    SUMMARY:Example
    SEQUENCE:0
    STATUS:CONFIRMED
    TRANSP:OPAQUE
    END:VEVENT
    

提交回复
热议问题