Commit 5238cd07 authored by Karl Denninger's avatar Karl Denninger

ZP-1285 Fix the call to GMT conversion for DTSTART and DTEND conversion from

DAVICAL events to ActiveSync format.  The timezone initialization passed
was the ActiveSync one, which PHP does not know and thus failed to index
properly for daylight savings time.  Replace with the check for a valid
PHP time zone field from the Davical server and, if invalid, use the
system default.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 1b59bc7d
...@@ -594,7 +594,7 @@ class BackendCalDAV extends BackendDiff { ...@@ -594,7 +594,7 @@ class BackendCalDAV extends BackendDiff {
break; break;
case "DTSTART": case "DTSTART":
$message->starttime = TimezoneUtil::MakeUTCDate($property->Value(), TimezoneUtil::ParseTimezone($property->GetParameterValue("TZID"))); $message->starttime = TimezoneUtil::MakeUTCDate($property->Value(), TimezoneUtil::GetPhpSupportedTimezone($property->GetParameterValue("TZID")));
if (strlen($property->Value()) == 8) { if (strlen($property->Value()) == 8) {
$message->alldayevent = "1"; $message->alldayevent = "1";
} }
...@@ -622,7 +622,7 @@ class BackendCalDAV extends BackendDiff { ...@@ -622,7 +622,7 @@ class BackendCalDAV extends BackendDiff {
break; break;
case "DTEND": case "DTEND":
$message->endtime = TimezoneUtil::MakeUTCDate($property->Value(), TimezoneUtil::ParseTimezone($property->GetParameterValue("TZID"))); $message->endtime = TimezoneUtil::MakeUTCDate($property->Value(), TimezoneUtil::GetPhpSupportedTimezone($property->GetParameterValue("TZID")));
if (strlen($property->Value()) == 8) { if (strlen($property->Value()) == 8) {
$message->alldayevent = "1"; $message->alldayevent = "1";
} }
......
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