diff --git a/src/Centreon/Domain/Monitoring/Resource.php b/src/Centreon/Domain/Monitoring/Resource.php index 6aa538358e4..f74e32de1cc 100644 --- a/src/Centreon/Domain/Monitoring/Resource.php +++ b/src/Centreon/Domain/Monitoring/Resource.php @@ -179,7 +179,7 @@ public function getDuration(): ?string { $result = null; - if ($this->getLastCheck()) { + if ($this->getLastStatusChange()) { $result = CentreonDuration::toString(time() - $this->getLastStatusChange()->getTimestamp()); }