Skip to content

Commit

Permalink
Bug: 15075 Fix timezone calculation copy/paste errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Dec 18, 2021
1 parent e597967 commit 8cda697
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/Horde/Timezone/Rule.php
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 8cda697

Please sign in to comment.