EventController: Use `DateFormatter::formatDateTime` to render dates

fixes #3968
This commit is contained in:
Johannes Meyer 2019-10-14 08:12:35 +02:00
parent 25e1942a9b
commit bb2673a49a
1 changed files with 13 additions and 13 deletions

View File

@ -339,7 +339,7 @@ class EventController extends Controller
case 'dt_start':
case 'dt_end':
$details = array(array(
array($this->translate('Entry time'), DateFormatter::formatTime($event->entry_time)),
array($this->translate('Entry time'), DateFormatter::formatDateTime($event->entry_time)),
array($this->translate('Is fixed'), $this->yesOrNo($event->is_fixed)),
array($this->translate('Is in effect'), $this->yesOrNo($event->is_in_effect)),
array($this->translate('Was started'), $this->yesOrNo($event->was_started))
@ -352,18 +352,18 @@ class EventController extends Controller
}
$details[] = array(
array($this->translate('Trigger time'), DateFormatter::formatTime($event->trigger_time)),
array($this->translate('Trigger time'), DateFormatter::formatDateTime($event->trigger_time)),
array(
$this->translate('Scheduled start time'),
DateFormatter::formatTime($event->scheduled_start_time)
DateFormatter::formatDateTime($event->scheduled_start_time)
),
array(
$this->translate('Actual start time'),
DateFormatter::formatTime($event->actual_start_time)
DateFormatter::formatDateTime($event->actual_start_time)
),
array(
$this->translate('Scheduled end time'),
DateFormatter::formatTime($event->scheduled_end_time)
DateFormatter::formatDateTime($event->scheduled_end_time)
)
);
@ -371,7 +371,7 @@ class EventController extends Controller
$details[] = array(
array(
$this->translate('Actual end time'),
DateFormatter::formatTime($event->actual_end_time)
DateFormatter::formatDateTime($event->actual_end_time)
)
);
}
@ -417,14 +417,14 @@ class EventController extends Controller
}
return array(
array($this->translate('Time'), DateFormatter::formatTime($event->comment_time)),
array($this->translate('Time'), DateFormatter::formatDateTime($event->comment_time)),
array($this->translate('Source'), $this->view->escape($commentSource)),
array($this->translate('Entry type'), $this->view->escape($entryType)),
array($this->translate('Author'), $this->contact($event->author_name)),
array($this->translate('Is persistent'), $this->yesOrNo($event->is_persistent)),
array($this->translate('Expires'), $this->yesOrNo($event->expires)),
array($this->translate('Expiration time'), DateFormatter::formatTime($event->expiration_time)),
array($this->translate('Deletion time'), DateFormatter::formatTime($event->deletion_time)),
array($this->translate('Expiration time'), DateFormatter::formatDateTime($event->expiration_time)),
array($this->translate('Deletion time'), DateFormatter::formatDateTime($event->deletion_time)),
array($this->translate('Message'), $this->comment($event->comment_data))
);
case 'flapping':
@ -441,7 +441,7 @@ class EventController extends Controller
}
return array(
array($this->translate('Event time'), DateFormatter::formatTime($event->event_time)),
array($this->translate('Event time'), DateFormatter::formatDateTime($event->event_time)),
array($this->translate('Reason'), $this->view->escape($reasonType)),
array($this->translate('State change'), $this->percent($event->percent_state_change)),
array($this->translate('Low threshold'), $this->percent($event->low_threshold)),
@ -481,8 +481,8 @@ class EventController extends Controller
}
$details = array(
array($this->translate('Start time'), DateFormatter::formatTime($event->start_time)),
array($this->translate('End time'), DateFormatter::formatTime($event->end_time)),
array($this->translate('Start time'), DateFormatter::formatDateTime($event->start_time)),
array($this->translate('End time'), DateFormatter::formatDateTime($event->end_time)),
array($this->translate('Reason'), $this->view->escape($notificationReason)),
array(
$this->translate('State'),
@ -502,7 +502,7 @@ class EventController extends Controller
$isService = $event->service_description !== null;
$details = array(
array($this->translate('State time'), DateFormatter::formatTime($event->state_time)),
array($this->translate('State time'), DateFormatter::formatDateTime($event->state_time)),
array($this->translate('State'), $this->state($isService, $event->state)),
array($this->translate('Check source'), $event->check_source),
array($this->translate('Check attempt'), $this->view->escape(sprintf(