diff --git a/config/bootstrap.php b/config/bootstrap.php index 9bb86d5380..8ab2a8ead3 100644 --- a/config/bootstrap.php +++ b/config/bootstrap.php @@ -207,14 +207,10 @@ * locale specific date formats. For details see * @link https://book.cakephp.org/4/en/core-libraries/internationalization-and-localization.html#parsing-localized-datetime-data */ -TypeFactory::build('time') - ->useImmutable(); -TypeFactory::build('date') - ->useImmutable(); -TypeFactory::build('datetime') - ->useImmutable(); -TypeFactory::build('timestamp') - ->useImmutable(); +TypeFactory::build('time'); +TypeFactory::build('date'); +TypeFactory::build('datetime'); +TypeFactory::build('timestamp'); /* * Custom Inflector rules, can be set to correctly pluralize or singularize diff --git a/plugins/Statusengine2Module/config/routes.php b/plugins/Statusengine2Module/config/routes.php index 9633f5ba0f..71dd4a3fd9 100644 --- a/plugins/Statusengine2Module/config/routes.php +++ b/plugins/Statusengine2Module/config/routes.php @@ -1,9 +1,10 @@ plugin( 'Statusengine2Module', ['path' => '/statusengine2-module'], function (RouteBuilder $routes) { diff --git a/src/Controller/HostsController.php b/src/Controller/HostsController.php index 21211ef0a1..be0f0750a6 100644 --- a/src/Controller/HostsController.php +++ b/src/Controller/HostsController.php @@ -216,6 +216,7 @@ public function index() { ->where([ 'Services.host_id' => $host['Host']['id'] ]) + ->all() ->toList(); $servicestatus = $ServicestatusTable->byUuids($serviceUuids, $ServicestatusFields); diff --git a/src/itnovum/openITCOCKPIT/Core/Views/UserTime.php b/src/itnovum/openITCOCKPIT/Core/Views/UserTime.php index fc16b029d8..5779b77ca4 100644 --- a/src/itnovum/openITCOCKPIT/Core/Views/UserTime.php +++ b/src/itnovum/openITCOCKPIT/Core/Views/UserTime.php @@ -25,7 +25,8 @@ namespace itnovum\openITCOCKPIT\Core\Views; -use Cake\I18n\Time; +use Cake\I18n\FrozenTime; +//use Cake\I18n\Time; use DateTime; use itnovum\openITCOCKPIT\Core\ValueObjects\User; @@ -74,7 +75,7 @@ public function format($t_time) { $t_time = 0; } - $Time = new Time($t_time); + $Time = new FrozenTime($t_time); $Time->setTimezone(new \DateTimeZone($this->timezone)); return $Time->format($this->format); @@ -93,7 +94,7 @@ public function customFormat($format, $t_time) { $t_time = 0; } - $Time = new Time($t_time); + $Time = new FrozenTime($t_time); $Time->setTimezone(new \DateTimeZone($this->timezone)); return $Time->format($format); @@ -190,7 +191,7 @@ public function timeAgoInWords($t_time, $options = []) { $t_time = 0; } - $Time = new Time($t_time); + $Time = new FrozenTime($t_time); $Time->setTimezone(new \DateTimeZone($this->timezone)); return $Time->timeAgoInWords($options);