Skip to content

Commit d35ee2e

Browse files
committed
Apply servertz to all day appointments with non GMT start times.
References: #136
1 parent 8f9737a commit d35ee2e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/grommunio/mapiprovider.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,9 @@ private function getAppointment($mapimessage, $contentparameters) {
369369
}
370370
else {
371371
// AS 16: apply timezone as this MUST result in midnight (to be sent to the client)
372-
// Adjust for TZ only if a timezone was saved with the message. Don't apply server TZ here.
373-
if ($message->timezone) {
372+
// Adjust for TZ only if a timezone was saved with the message.
373+
// If the starttime is not at midnight and if there is no saved timezone with the message, try applying the server TZ as well.
374+
if ($message->timezone || boolval(intval(gmdate("H", $message->starttime))) || boolval(intval(gmdate("i", $message->starttime)))) {
374375
$message->starttime = $this->getLocaltimeByTZ($message->starttime, $tz);
375376
}
376377
}

0 commit comments

Comments
 (0)