--- a/kronolith/lib/Driver/kolab.php    2007-11-29 12:33:10.000000000 +0000
+++ b/kronolith/lib/Driver/kolab.php    2008-03-10 18:33:55.000000000 +0000
@@ -1119,12 +1119,22 @@

             /* do recurrence expansion if not keeping anyway */
             if (!$keep_event && $event->recurs()) {
+
                 $next = $event->recurrence->nextRecurrence($startDate);
-                if ($next !== false &&
-                    !$event->recurrence->hasException($next->year, $next->month, $next->mday) &&
-                    (!(($endDate->compareDateTime($event->start) < 0) ||
-                       ($startDate->compareDateTime($event->end) > 0)))) {
-                    $keep_event = true;
+                if ($next !== false) {
+                    while (($endDate->compareDateTime($next) > 0) && $event->recurrence->hasException($next->year, $next->month, $next->mday)) {
+                        $next->mday += 1;
+                        $next->correct();
+                        $next = $event->recurrence->nextRecurrence($next);
+                    }
+                }
+                if ($next !== false) {
+                    $next_duration = $next->timestamp() - $event->start->timestamp();
+                    $next_end = &new Horde_Date($event->end->timestamp() + $next_duration);
+                    if (!(($endDate->compareDateTime($next) < 0) ||
+                       ($startDate->compareDateTime($next_end) > 0))) {
+                        $keep_event = true;
+                    }
                 }
             }