Skip to content

Commit 40d78f9

Browse files
committed
wDayOfWeek (week-day) and wDay (effective week of month) were switched when getting a TZ array from a TZ definition.
References: Issue #136
1 parent 6005164 commit 40d78f9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

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)