[dev] kronolith VCALENDAR export/import for all day events

Jan Schneider jan at horde.org
Sun Oct 29 02:09:45 PST 2006


Zitat von Karsten Fourmont <fourmont at gmx.de>:

> Hi,
>
> until now, we did export and all day event of let's say new Year's  
> eve to vcalendar as this:
>
> BEGIN:VCALENDAR
> VERSION:1.0
> BEGIN:VEVENT
> SUMMARY:New Year's eve
> DTSTART;VALUE=DATE:20063112
> DTSTART;VALUE=DATE:20070101
> END:VEVENT
> END:VCALENDAR
>
> Two problems:
> 1) it seems better to have the end date as 20063112 rather than  
> 20070101. Currently it looks like a two day event. Actually when  
> importing this again into horde it is converted to a two day event.
>
> 2) VCALENDAR version 1.0 simply doesn't support VALUE=DATE
> This is only allowed in VCALENDAR 2.0!
>
> Looking at how other devices handle all day events it seems they get  
> sent as this:
> DTSTART:20063112T000000
> DTEND:200613112T235959
> or as this
> DTSTART:20063112T000000
> DTEND:20070101T000000
> Please note these are not UTC (no terminal Z).
>
> So I implemented the following changes:
>
> 1) The VALUE=DATE option is only used for VCALENDAR2.0. A one day  
> event is exported as this:
> DTSTART;VALUE=DATE:20063112
> DTEND;VALUE=DATE:20063112
>
> 2) For VCALENDAR 1.0 the same event is exported like this:
> DTSTART:20063112T000000
> DTEND:20063112T235959
> This is the format the Synthesis client uses and the Synthesis guys  
> seem to have the biggest experience about what various clients accept.
>
> 3) When importing an event, all of these are considered all day events:
> a)
> DTSTART;VALUE=DATE:20063112
> DTSTART;VALUE=DATE:20063112
> b)
> DTSTART:20063112T000000
> DTEND:200613112T235959
> c)
> DTSTART:20063112T000000
> DTEND:20070101T0000
>
>
> It's in CVS like this now. If I should change anything, please let me know.

No, sounds very reasonable, thanks for cleaning it up.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the dev mailing list