How to echo the date of the last update of the site

Hey there !

I can’t find anything, It looks easy but I don’t really know actually.

I tried :

<?php echo $site->modified('d/m/Y H:i') ?>

but the date or time is not correct.

:frowning: Help

You code should be correct, unless you have set strftime as date handler in your config, or your time zone is not correct, depending on what sort of “wrong” your result is…

For example, I modfified a page one hour ago, it says it was the 27/06/2017.
What is strftime ??

strftime is another data handler you can set in your config.

But it seems your date comes out formatted correctly, only with the wrong date, I assume that’s a timezone setting. You can set your timezone in your config.php.

1 Like