--- date_repeat_calc.inc.orig	2011-01-01 11:52:57.000000000 +1100
+++ date_repeat_calc.inc	2011-10-14 21:38:31.755398711 +1100
@@ -49,6 +49,7 @@ function _date_repeat_calc($rrule, $star
   // Create a date object for the start and end dates.
   $start_date = date_make_date($start, $timezone);
   $end_date = date_make_date($end, $timezone);
+  $modify_time = ' ' . $start_date->format('g:ia');
   
   // If the rule has an UNTIL, see if that is earlier than the end date.
   if (!empty($rrule['UNTIL'])) {
@@ -134,7 +135,7 @@ function _date_repeat_calc($rrule, $star
           }
           // Back up to first of month and jump.
           $current_day = date_repeat_set_month_day($current_day, NULL, 1, '+', $timezone);
-          date_modify($current_day, '+'. $jump);
+          date_modify($current_day, '+' . $jump . $modify_time);
         }
         // If it's yearly, break out of the loop at the
         // end of every year, and jump one INTERVAL in years.
@@ -145,14 +146,14 @@ function _date_repeat_calc($rrule, $star
           else {
             // Back up to first of month and jump.
             $current_day = date_repeat_set_month_day($current_day, NULL, 1, '+', $timezone);
-            date_modify($current_day, '+1 month');
+            date_modify($current_day, '+1 month' . $jump . $modify_time);
           }
         }
       }
       if ($rrule['FREQ'] == 'YEARLY') {
         // Back up to first of year and jump.
         $current_day = date_repeat_set_year_day($current_day, NULL, 1, '+', $timezone);
-        date_modify($current_day, '+'. $jump);
+        date_modify($current_day, '+' . $jump . $modify_time);
       }
       $finished = date_repeat_is_finished($current_day, $days, $count, $end_date);
     }
@@ -170,7 +171,7 @@ function _date_repeat_calc($rrule, $star
     while (!$finished) {
       date_repeat_add_dates($days, $current_day, $start_date, $end_date, $exceptions, $rrule);
       $finished = date_repeat_is_finished($current_day, $days, $count, $end_date);
-      date_modify($current_day, '+'. $jump);
+      date_modify($current_day, '+' . $jump . $modify_time);
     }
   }
 
@@ -247,7 +248,7 @@ function _date_repeat_calc($rrule, $star
           date_date_set($current_day, $year, 1, 1);
         }
         // Jump to the next period.
-        date_modify($current_day, '+'. $jump);
+        date_modify($current_day, '+' . $jump . $modify_time);
       }
     }
 
@@ -268,7 +269,7 @@ function _date_repeat_calc($rrule, $star
       // jump to the next week. The date_repeat_add_dates() function will
       // keep dates outside the range from getting added.
       if (date_format($current_day, 'l') != $day_names[$day]) {  
-        date_modify($current_day, '-1 '. $week_start_day);
+        date_modify($current_day, '-1 ' . $week_start_day . $modify_time);
       }
       while (!$finished) {
         $period_finished = FALSE;
@@ -284,7 +285,7 @@ // function is insufficient to test whet
             // If we're already on the right day, don't jump or we
             // will prematurely move into the next week.
             if (date_format($current_day, 'l') != $day) {
-              date_modify($current_day, '+1 '. $day);
+              date_modify($current_day, '+1 ' . $day . $modify_time);
               $moved = TRUE;
             }
             if ($rrule['FREQ'] == 'WEEKLY' || date_format($current_day, $format) == $current_period) {
@@ -296,7 +297,7 @@ // function is insufficient to test whet
           // Make sure we don't get stuck in endless loop if the current
           // day never got changed above.
           if (!$moved) {
-            date_modify($current_day, '+1 day');
+            date_modify($current_day, '+1 day' . $modify_time);
           }
                       
           // If this is a WEEKLY frequency, stop after each week,
@@ -321,20 +322,20 @@ // function is insufficient to test whet
         // ensure we jump to the first day of the next period.
         switch ($rrule['FREQ']) {
           case 'WEEKLY':
-            date_modify($current_day, '+1 '. $week_start_day);
-            date_modify($current_day, '-1 week');
+            date_modify($current_day, '+1 ' . $week_start_day . $modify_time);
+            date_modify($current_day, '-1 week' . $modify_time);
             break;
           case 'MONTHLY':
-            date_modify($current_day, '-'. (date_format($current_day, 'j') - 1) .' days');
-            date_modify($current_day, '-1 month');
+            date_modify($current_day, '-' . (date_format($current_day, 'j') - 1) .' days' . $modify_time);
+            date_modify($current_day, '-1 month' . $modify_time);
             break;
           case 'YEARLY':
-            date_modify($current_day, '-'. date_format($current_day, 'z') .' days');
-            date_modify($current_day, '-1 year');
+            date_modify($current_day, '-' . date_format($current_day, 'z') .' days' . $modify_time);
+            date_modify($current_day, '-1 year' . $modify_time);
             break;
         }
         // Jump ahead to the next period to be evaluated.
-        date_modify($current_day, '+'. $jump);
+        date_modify($current_day, '+'. $jump . $modify_time);
         $current_period = date_format($current_day, $format);
         $finished = date_repeat_is_finished($current_day, $days, $count, $end_date);
       }
@@ -484,23 +485,23 @@ // through this function multiple times.
     $date = date_make_date($datetime, $timezone);
     if ($direction == '-') {
       // For negative search, start from the end of the month.
-      date_modify($date, '+1 month');
+      date_modify($date, '+1 month' . $modify_time);
     }
     else {
       // For positive search, back up one day to get outside the
       // current month, so we can catch the first of the month.
-      date_modify($date, '-1 day');
+      date_modify($date, '-1 day' . $modify_time);
     }
     
     if (empty($day)) {
-      date_modify($date, $direction . $count .' days');
+      date_modify($date, $direction . $count . ' days' . $modify_time);
     }
     else {
       // Use the English text for order, like First Sunday
       // instead of +1 Sunday to overcome PHP5 bug, (see #369020).
       $order = date_order();
       $step = $count <= 5 ? $order[$direction . $count] : $count;
-      date_modify($date, $step . ' ' . $day);
+      date_modify($date, $step . ' ' . $day . $modify_time);
     }
     
     // If that takes us outside the current month, don't go there.
@@ -531,23 +532,23 @@ function date_repeat_set_year_day($date_
     $date = date_make_date($datetime, $timezone);
     if ($direction == '-') {
       // For negative search, start from the end of the year.
-      date_modify($date, '+1 year');
+      date_modify($date, '+1 year' . $modify_time);
     }
     else {
       // For positive search, back up one day to get outside the
       // current year, so we can catch the first of the year.
-      date_modify($date, '-1 day');
+      date_modify($date, '-1 day' . $modify_time);
     }
     
     if (empty($day)) {
-      date_modify($date, $direction . $count .' days');
+      date_modify($date, $direction . $count . ' days' . $modify_time);
     }
     else {
       // Use the English text for order, like First Sunday
       // instead of +1 Sunday to overcome PHP5 bug, (see #369020).
       $order = date_order();
       $step = $count <= 5 ? $order[$direction . $count] : $count;
-      date_modify($date, $step . ' ' . $day);
+      date_modify($date, $step . ' ' . $day . $modify_time);
     }
     
     // If that takes us outside the current year, don't go there.
@@ -556,4 +557,4 @@ function date_repeat_set_year_day($date_
     }
   }
   return $date_in;
-}
\ No newline at end of file
+}
