-
Bug
-
Resolution: Fixed
-
Minor
-
2.7.7, 2.8.5, 2.8.8
-
MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_28_STABLE, MOODLE_29_STABLE
-
MDL-49561_master -
When exporting a calendar from Moodle as ical, there is a problem with
events with zero duration (called "without duration in Moodle)
Currently this is exported with only a DTSTART, ex.:
DTSTART:20150312T132500Z
This causes different behaviour in eg. Google Calendar and Microsoft
Outlook. Google sets the event to a 1 hour duration, Outlook more
correcly issues an error.
According to RFC2445 (see below) zero duration events should exported
with VALUE=DATE in DTSTART, eg.:
DTSTART;VALUE=DATE:20150312
According to RFC2445 DTEND can then be omitted, but a large number of
ical validators doesn't like that end it is OK to set it. So the above
should be exported as:
DTSTART;VALUE=DATE:20150312
DTEND;VALUE=DATE:20150313
The attached patch implements this.
Ref. 4.6.1 in RFC2445:
"...The "VEVENT" is also the calendar component used to specify an
anniversary or daily reminder within a calendar. These events have a
DATE value type for the "DTSTART" property instead of the default
data type of DATE-TIME. If such a "VEVENT" has a "DTEND" property, it
MUST be specified as a DATE value also. The anniversary type of
"VEVENT" can span more than one date (i.e, "DTEND" property value is
set to a calendar date after the "DTSTART" property value)...."