Skip to content

Commit

Permalink
Don't calculate a 'time' value that is after 'end'.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Feb 7, 2017
1 parent ec55678 commit 68cf1d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions framework/Icalendar/lib/Horde/Icalendar/Vtimezone.php
Expand Up @@ -151,6 +151,10 @@ public function parseChild($child, $year)
}

// Get the timestamp for the first day of $month.
if ($result['end'] && $year > $result['end']) {
$year = $result['end'];
}

$when = gmmktime($start['hours'], $start['minutes'], $start['seconds'],
$month, 1, $year);
// Get the day of the week for the first day of $month.
Expand Down

0 comments on commit 68cf1d9

Please sign in to comment.