Export sequence attribute; fix UTC date formatting in iCal exports
This commit is contained in:
parent
78690dfed4
commit
ff5f354423
1 changed files with 3 additions and 1 deletions
|
@ -356,6 +356,8 @@ class calendar_ical
|
|||
$vevent = "BEGIN:VEVENT" . self::EOL;
|
||||
$vevent .= "UID:" . self::escpape($event['uid']) . self::EOL;
|
||||
$vevent .= $this->format_datetime("DTSTAMP", $event['changed'] ?: new DateTime(), false, true) . self::EOL;
|
||||
if ($event['sequence'])
|
||||
$vevent .= "SEQUENCE:" . intval($event['sequence']) . self::EOL;
|
||||
// correctly set all-day dates
|
||||
if ($event['allday']) {
|
||||
$event['end'] = clone $event['end'];
|
||||
|
@ -444,7 +446,7 @@ class calendar_ical
|
|||
// <ATTR>;TZID=Europe/Zurich:20120706T210000
|
||||
$tz = $dt->getTimezone();
|
||||
$tzid = $tz && $tz->getName() != 'UTC' ? ';TZID=' . $tz->getName() : '';
|
||||
return $attr . $tzid . ':' . $dt->format('Ymd\THis' . ($tzid ? '' : 'Z'));
|
||||
return $attr . $tzid . ':' . $dt->format('Ymd\THis' . ($tzid ? '' : '\Z'));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue