Skip to content

Commit 6005164

Browse files
committed
Adjust all day events to midnight only if a tz def was saved with the message. The server timezone should not be applied in this case, because if no tz is there, time should be midnight already.
References: Issue #136
1 parent 22f2119 commit 6005164

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/grommunio/mapiprovider.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* SPDX-License-Identifier: AGPL-3.0-only
44
* SPDX-FileCopyrightText: Copyright 2007-2016 Zarafa Deutschland GmbH
5-
* SPDX-FileCopyrightText: Copyright 2020-2024 grommunio GmbH
5+
* SPDX-FileCopyrightText: Copyright 2020-2025 grommunio GmbH
66
*/
77

88
class MAPIProvider {
@@ -368,7 +368,10 @@ private function getAppointment($mapimessage, $contentparameters) {
368368
}
369369
else {
370370
// AS 16: apply timezone as this MUST result in midnight (to be sent to the client)
371-
$message->starttime = $this->getLocaltimeByTZ($message->starttime, $tz);
371+
// Adjust for TZ only if a timezone was saved with the message. Don't apply server TZ here.
372+
if ($message->timezone) {
373+
$message->starttime = $this->getLocaltimeByTZ($message->starttime, $tz);
374+
}
372375
}
373376
$message->endtime = $message->starttime + $duration;
374377
if (Request::GetProtocolVersion() >= 16.0) {

0 commit comments

Comments
 (0)