From bb2673a49a253c157ef8446d5b135a2fe4b6e5d1 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Mon, 14 Oct 2019 08:12:35 +0200 Subject: [PATCH] EventController: Use `DateFormatter::formatDateTime` to render dates fixes #3968 --- .../controllers/EventController.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/modules/monitoring/application/controllers/EventController.php b/modules/monitoring/application/controllers/EventController.php index e17ffb97a..d0a8d3156 100644 --- a/modules/monitoring/application/controllers/EventController.php +++ b/modules/monitoring/application/controllers/EventController.php @@ -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(