Skip to content

Commit

Permalink
Merge pull request #14 from oveleon/develop
Browse files Browse the repository at this point in the history
Fixing the human-readable time output in comments
  • Loading branch information
zoglo authored Jul 24, 2023
2 parents 41db3d1 + 0189d25 commit 26a95b9
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 26a95b9

Please sign in to comment.