Turn on some more debugging to try to figure out what goes wrong on Travis

This commit is contained in:
nathangray 2017-10-23 17:02:33 +02:00
parent 7ee539ab3a
commit 9e48fe5ac2
2 changed files with 7 additions and 3 deletions

View File

@ -899,6 +899,7 @@ class calendar_bo
if (!$start) $start = $event['start']; if (!$start) $start = $event['start'];
$events = array(); $events = array();
error_log(__METHOD__ . " Horizon config: {$this->config['horizont']}");
$this->insert_all_recurrences($event,$start,$this->date2usertime($this->config['horizont']),$events); $this->insert_all_recurrences($event,$start,$this->date2usertime($this->config['horizont']),$events);
$exceptions = array(); $exceptions = array();
@ -1114,7 +1115,9 @@ class calendar_bo
$event_start_ts = $this->date2ts($event['start']); $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! $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 $end is before recur_enddate, use it instead
if (!$event['recur_enddate'] || $this->date2ts($event['recur_enddate']) > $this->date2ts($end)) 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'] = is_a($event['recur_enddate'],'DateTime') ?
$event['recur_enddate'] : $event['recur_enddate'] :
new Api\DateTime($event['recur_enddate'], calendar_timezones::DateTimeZone($event['tzid'])); 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 exceptions, as we need to add them as recurrence too, but marked as exception
unset($event['recur_exception']); unset($event['recur_exception']);
// loop over all recurrences and insert them, if they are after $start // loop over all recurrences and insert them, if they are after $start

View File

@ -331,7 +331,8 @@ class TimezoneTest extends \EGroupware\Api\AppTest {
$GLOBALS['egw_info']['user']['account_id'] => 'A' $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; return $event;
} }