From 8cda697301fb58e6f3801e6d3eb5916301975a34 Mon Sep 17 00:00:00 2001 From: Michael J Rubinsky Date: Sat, 18 Dec 2021 17:20:36 -0500 Subject: [PATCH] Bug: 15075 Fix timezone calculation copy/paste errors. --- lib/Horde/Timezone/Rule.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Horde/Timezone/Rule.php b/lib/Horde/Timezone/Rule.php index c5c1ff8..20e89fe 100644 --- a/lib/Horde/Timezone/Rule.php +++ b/lib/Horde/Timezone/Rule.php @@ -211,6 +211,7 @@ public function addRules(Horde_Icalendar_Vtimezone $tz, $tzid, $name, } elseif (strpos($rule[6], '<=')) { // Rule starts on a certain weekday before a certain day of // month. + list($weekday, $day) = explode('<=', $rule[6]); for ($days = array(), $i = 1; $i <= $day; $i++) { $days[] = $i; } @@ -273,7 +274,7 @@ protected function _getFirstMatch($rule, $year) } } elseif (strpos($rule[6], '<=')) { // Rule starts on a certain weekday before a certain day of month. - list($weekday, $day) = explode('>=', $rule[6]); + list($weekday, $day) = explode('<=', $rule[6]); $weekdayInt = $this->_weekdays[substr($weekday, 0, 3)]; $date = new Horde_Date(array( 'year' => $year,