Skip to content

Commit 8f9737a

Browse files
committed
Merge branch '136-all-day-events-spanning-two-days-on-ios' into 'master'
More all day event fixes Closes #136 See merge request grommunio/grommunio-sync!106
2 parents 6252d43 + 40d78f9 commit 8f9737a

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

lib/grommunio/mapiprovider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,10 @@ 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-
$message->starttime = $this->getLocaltimeByTZ($message->starttime, $tz);
372+
// Adjust for TZ only if a timezone was saved with the message. Don't apply server TZ here.
373+
if ($message->timezone) {
374+
$message->starttime = $this->getLocaltimeByTZ($message->starttime, $tz);
375+
}
373376
}
374377
$message->endtime = $message->starttime + $duration;
375378
if (Request::GetProtocolVersion() >= 16.0) {

lib/utils/timezoneutil.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?php
2+
23
/*
34
* SPDX-License-Identifier: AGPL-3.0-only
45
* SPDX-FileCopyrightText: Copyright 2007-2016 Zarafa Deutschland GmbH
5-
* SPDX-FileCopyrightText: Copyright 2020-2024 grommunio GmbH
6+
* SPDX-FileCopyrightText: Copyright 2020-2025 grommunio GmbH
67
*
78
* Class to generate AS compatible timezone information
89
*/
@@ -1462,17 +1463,17 @@ public static function GetTzFromTimezoneDef($tzdef) {
14621463
$tz['bias'] = $rule['bias'];
14631464
$tz['dstendyear'] = $rule['stStandardDate']['year'];
14641465
$tz['dstendmonth'] = $rule['stStandardDate']['month'];
1465-
$tz['dstendday'] = $rule['stStandardDate']['day'];
1466-
$tz['dstendweek'] = $rule['stStandardDate']['dayofweek'];
1466+
$tz['dstendday'] = $rule['stStandardDate']['dayofweek'];
1467+
$tz['dstendweek'] = $rule['stStandardDate']['day'];
14671468
$tz['dstendhour'] = $rule['stStandardDate']['hour'];
14681469
$tz['dstendminute'] = $rule['stStandardDate']['minute'];
14691470
$tz['dstendsecond'] = $rule['stStandardDate']['second'];
14701471
$tz['dstendmillis'] = $rule['stStandardDate']['miliseconds'];
14711472
$tz['stdbias'] = $rule['stdbias'];
14721473
$tz['dststartyear'] = $rule['stDaylightDate']['year'];
14731474
$tz['dststartmonth'] = $rule['stDaylightDate']['month'];
1474-
$tz['dststartday'] = $rule['stDaylightDate']['day'];
1475-
$tz['dststartweek'] = $rule['stDaylightDate']['dayofweek'];
1475+
$tz['dststartday'] = $rule['stDaylightDate']['dayofweek'];
1476+
$tz['dststartweek'] = $rule['stDaylightDate']['day'];
14761477
$tz['dststarthour'] = $rule['stDaylightDate']['hour'];
14771478
$tz['dststartminute'] = $rule['stDaylightDate']['minute'];
14781479
$tz['dststartsecond'] = $rule['stDaylightDate']['second'];

0 commit comments

Comments
 (0)