Commit e11ac2e9 authored by Robert Rollins's avatar Robert Rollins

Issue [#2088323]: Treat UTC dates differently from dates w/ other timezones.

iCalcreator requires that you *not* call createTimezone($vcal, 'UTC'), because
the spec says to use zulu time rather than a UTC VTIMEZONE object.

Also fixed a copy-pasta bug that probably never manifested, since it would have
only had an effect on events that have an end date that's in a different
timezone from the start date.
parent 5501191d
......@@ -166,7 +166,7 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
// Only add the end date if there is one.
if (!empty($event['end'])) {
$end = $event['end']->toArray();
$timezone = $event['start']->getTimezone()->getName();
$timezone = $event['end']->getTimezone()->getName();
$timezones[$timezone] = $timezone;
if ($event['all_day']) {
......@@ -288,7 +288,9 @@ class date_ical_plugin_style_ical_feed extends views_plugin_style {
// Now add all the timezones we just used to the calendar.
foreach ($timezones as $timezone) {
iCalUtilityFunctions::createTimezone($vcalendar, $timezone);
if (strtoupper($timezone) != 'UTC') {
iCalUtilityFunctions::createTimezone($vcalendar, $timezone);
}
}
// Allow other modules to alter the calendar as a whole.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment