plugins/calendar
Thomas Brüderli
bruederli at kolabsys.com
Thu Oct 18 19:45:10 CEST 2012
plugins/calendar/lib/calendar_ical.php | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit ff5f3544234a7e75de1de0b6a0d30cb44493f379
Author: Thomas Bruederli <bruederli at kolabsys.com>
Date: Thu Oct 18 19:45:01 2012 +0200
Export sequence attribute; fix UTC date formatting in iCal exports
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'));
}
}
More information about the commits
mailing list