summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <bruederli@kolabsys.com>2012-10-18 17:45:01 (GMT)
committerThomas Bruederli <bruederli@kolabsys.com>2012-10-18 17:45:01 (GMT)
commitff5f3544234a7e75de1de0b6a0d30cb44493f379 (patch)
tree89de6e27c9082d8a7987426e86cd9b4841d595fa
parent78690dfed43f277e2b15d63580dba80de79c077d (diff)
downloadroundcubemail-plugins-kolab-ff5f3544234a7e75de1de0b6a0d30cb44493f379.tar.gz
Export sequence attribute; fix UTC date formatting in iCal exports
-rw-r--r--plugins/calendar/lib/calendar_ical.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/calendar/lib/calendar_ical.php b/plugins/calendar/lib/calendar_ical.php
index 594993e..20d5757 100644
--- a/plugins/calendar/lib/calendar_ical.php
+++ b/plugins/calendar/lib/calendar_ical.php
@@ -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'));
}
}