diff --git a/framework/Icalendar/lib/Horde/Icalendar/Vtimezone.php b/framework/Icalendar/lib/Horde/Icalendar/Vtimezone.php
index 8344840..3594167 100644
--- a/framework/Icalendar/lib/Horde/Icalendar/Vtimezone.php
+++ b/framework/Icalendar/lib/Horde/Icalendar/Vtimezone.php
@@ -152,7 +152,7 @@ class Horde_Icalendar_Vtimezone extends Horde_Icalendar
 
         // Get the timestamp for the first day of $month.
         $when = gmmktime($start['hours'], $start['minutes'], $start['seconds'],
-                         $month, 1, $year);
+                         $month, 1, $result['end']);
         // Get the day of the week for the first day of $month.
         $first_of_month_weekday = intval(gmstrftime('%w', $when));