Hi
In a model I compare two date values (one is the last update of the page, the other is stored “globally” in site->OffersdataLastupdate).
/site/model/offers.php
dump($this->uid() . '.txt' . ' has been last modified on: ' . $this->modified('d/m/Y H:i'));
dump('The structured data of ' . $this->uid() . ' has been last modified on: ' . gmdate("d/m/Y H:i", site()->OffersdataLastupdate()->toInt()));
OffersdataLastupdate is defined like this:
/site/config/config.php
Is there a reason why you’re using gmdate() instead of simply date()?
By default, Kirby uses date() behind the scenes as its ‘date handler’ function. If you specifically want to do things like time-zone conversions or date localisation you may want to change your date handler to strftime(), as described here in the docs.
If you’re using the date() handler, the format string for the Unix timestamp is U - if I remember correctly… If you’re using the strftime() handler, the format string is %s.