Load the timeobjects *after* correcting the start/end dates.
authorJan Schneider <jan@horde.org>
Wed, 7 Jul 2010 14:08:38 +0000 (16:08 +0200)
committerJan Schneider <jan@horde.org>
Wed, 7 Jul 2010 14:11:18 +0000 (16:11 +0200)
kronolith/lib/Driver/Horde.php

index 8921b0e..0f5d586 100644 (file)
@@ -72,14 +72,14 @@ class Kronolith_Driver_Horde extends Kronolith_Driver
                                             'year' => 9999));
         }
 
-        $eventsList = $this->_params['registry']->call($this->api . '/listTimeObjects', array(array($category), $startDate, $endDate));
-
         $startDate = clone $startDate;
         $startDate->hour = $startDate->min = $startDate->sec = 0;
         $endDate = clone $endDate;
         $endDate->hour = 23;
         $endDate->min = $endDate->sec = 59;
 
+        $eventsList = $this->_params['registry']->call($this->api . '/listTimeObjects', array(array($category), $startDate, $endDate));
+
         $results = array();
         foreach ($eventsList as $eventsListItem) {
             $event = new Kronolith_Event_Horde($this, $eventsListItem);