From 0189d25dd2f3f6988adc42c903d20c0a0d6bb133 Mon Sep 17 00:00:00 2001 From: doishub Date: Mon, 24 Jul 2023 14:03:00 +0200 Subject: [PATCH] Fixing the human-readable time output in comments --- contao/modules/ModuleRecommendation.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contao/modules/ModuleRecommendation.php b/contao/modules/ModuleRecommendation.php index f0d50ec..c58ad0f 100644 --- a/contao/modules/ModuleRecommendation.php +++ b/contao/modules/ModuleRecommendation.php @@ -308,7 +308,7 @@ protected function addInternalImage($objModel, &$objTemplate): void */ protected function getElapsedTime(string $strDateTime): string { - $objElapsedTime = (new \DateTime($strDateTime))->diff(new \DateTime()); + $objElapsedTime = (new \DateTime($strDateTime))->diff(new \DateTime(date("Y-m-d\TH:i:sP",time()))); if (($years = $objElapsedTime->y) > 0) {