From 9e48fe5ac2704a5d7c287e724d748dadc29fb1eb Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 23 Oct 2017 17:02:33 +0200 Subject: [PATCH] Turn on some more debugging to try to figure out what goes wrong on Travis --- calendar/inc/class.calendar_bo.inc.php | 7 +++++-- calendar/tests/TimezoneTest.php | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/calendar/inc/class.calendar_bo.inc.php b/calendar/inc/class.calendar_bo.inc.php index 281fa9e4f1..0ab9323277 100644 --- a/calendar/inc/class.calendar_bo.inc.php +++ b/calendar/inc/class.calendar_bo.inc.php @@ -899,6 +899,7 @@ class calendar_bo if (!$start) $start = $event['start']; $events = array(); + error_log(__METHOD__ . " Horizon config: {$this->config['horizont']}"); $this->insert_all_recurrences($event,$start,$this->date2usertime($this->config['horizont']),$events); $exceptions = array(); @@ -1114,7 +1115,9 @@ class calendar_bo $event_start_ts = $this->date2ts($event['start']); $event_length = $this->date2ts($event['end']) - $event_start_ts; // we use a constant event-length, NOT a constant end-time! - error_log(__METHOD__ . ':'.__LINE__ ." Event end date: " . Api\DateTime::to($event['recur_enddate'], Api\DateTime::DATABASE)); + error_log(__METHOD__ . ':'.__LINE__ ." Recurrence end date: " . Api\DateTime::to($event['recur_enddate'], Api\DateTime::DATABASE)); + error_log(__METHOD__ . ':'.__LINE__ ." Event end date: " . Api\DateTime::to($event['end'], Api\DateTime::DATABASE)); + error_log(__METHOD__ . ':'.__LINE__ ." Recurrence horizon: " . Api\DateTime::to($end, Api\DateTime::DATABASE)); // if $end is before recur_enddate, use it instead if (!$event['recur_enddate'] || $this->date2ts($event['recur_enddate']) > $this->date2ts($end)) { @@ -1125,7 +1128,7 @@ class calendar_bo $event['recur_enddate'] = is_a($event['recur_enddate'],'DateTime') ? $event['recur_enddate'] : new Api\DateTime($event['recur_enddate'], calendar_timezones::DateTimeZone($event['tzid'])); - error_log(__METHOD__ . ':'.__LINE__ ." Event end date: " . Api\DateTime::to($event['recur_enddate'], Api\DateTime::DATABASE)); + error_log(__METHOD__ . ':'.__LINE__ ." Recurrence end date: " . Api\DateTime::to($event['recur_enddate'], Api\DateTime::DATABASE)); // unset exceptions, as we need to add them as recurrence too, but marked as exception unset($event['recur_exception']); // loop over all recurrences and insert them, if they are after $start diff --git a/calendar/tests/TimezoneTest.php b/calendar/tests/TimezoneTest.php index 5de5ed1e8c..2a5de082f7 100644 --- a/calendar/tests/TimezoneTest.php +++ b/calendar/tests/TimezoneTest.php @@ -331,7 +331,8 @@ class TimezoneTest extends \EGroupware\Api\AppTest { $GLOBALS['egw_info']['user']['account_id'] => 'A' ) ); - error_log(__METHOD__ . ':'.__LINE__ ." Event end date: " . Api\DateTime::to($event['recur_enddate'], Api\DateTime::DATABASE)); + error_log(__METHOD__ . ':'.__LINE__ ." Event end date: " . Api\DateTime::to($event['end'], Api\DateTime::DATABASE)); + error_log(__METHOD__ . ':'.__LINE__ ." Recurrence end date: " . Api\DateTime::to($event['recur_enddate'], Api\DateTime::DATABASE)); return $event; }