Skip to content

Commit

Permalink
Fixing the human-readable time output in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
doishub committed Jul 24, 2023
1 parent 08d8cf4 commit 0189d25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contao/modules/ModuleRecommendation.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 0189d25

Please sign in to comment.