Commit 1512331a authored by Manfred Kutas's avatar Manfred Kutas

ZP-1322 Send timezone for all recurring non-daily appointments.

Remove unnecessary loging.

Released under the Affero GNU General Public License (AGPL) version 3.
parent 6bc8319d
...@@ -237,7 +237,7 @@ class MAPIProvider { ...@@ -237,7 +237,7 @@ class MAPIProvider {
$this->getRecurrence($mapimessage, $messageprops, $message, $message->recurrence, $tz); $this->getRecurrence($mapimessage, $messageprops, $message, $message->recurrence, $tz);
// outlook seems to honour the timezone information contrary to other clients // outlook seems to honour the timezone information contrary to other clients
if (Request::IsOutlook()) { if (empty($message->alldayevent) || Request::IsOutlook()) {
$message->timezone = base64_encode(TimezoneUtil::GetSyncBlobFromTZ($tz)); $message->timezone = base64_encode(TimezoneUtil::GetSyncBlobFromTZ($tz));
} }
} }
...@@ -364,11 +364,9 @@ class MAPIProvider { ...@@ -364,11 +364,9 @@ class MAPIProvider {
// If it was created in another timezone and we have that information, // If it was created in another timezone and we have that information,
// set the startime to the midnight of the current timezone. // set the startime to the midnight of the current timezone.
if ($appTz && ($localStartTime['tm_hour'] || $localStartTime['tm_min'])) { if ($appTz && ($localStartTime['tm_hour'] || $localStartTime['tm_min'])) {
$duration = $message->endtime - $message->starttime;
ZLog::Write(LOGLEVEL_DEBUG, "MAPIProvider->getAppointment(): all-day event starting not midnight."); ZLog::Write(LOGLEVEL_DEBUG, "MAPIProvider->getAppointment(): all-day event starting not midnight.");
$duration = $message->endtime - $message->starttime;
$serverTz = TimezoneUtil::GetFullTZ(); $serverTz = TimezoneUtil::GetFullTZ();
ZLog::Write(LOGLEVEL_DEBUG, print_r($serverTz, 1));
$message->starttime = $this->getGMTTimeByTZ($this->getLocaltimeByTZ($message->starttime, $tz), $serverTz); $message->starttime = $this->getGMTTimeByTZ($this->getLocaltimeByTZ($message->starttime, $tz), $serverTz);
$message->endtime = $message->starttime + $duration; $message->endtime = $message->starttime + $duration;
} }
......
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