Skip to content

Commit 11a21a1

Browse files
committed
Merge branch '136-all-day-events-spanning-two-days-on-ios3' into 'master'
Apply servertz to all day appointments with non GMT start times. Closes #136 See merge request grommunio/grommunio-sync!107
2 parents 8f9737a + d35ee2e commit 11a21a1

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)