gonziis - 2 months ago

I tried using post.publish_at.date|date("d/m/Y") and also {{ carbon(post.publish_at.date, "Europe/Riga").format("d/m/Y") }} but both always show the incorrect year. One of the posts has publish year 2017, but it still displays 2018. post.publish_at.date|raw shows 2017

Answer

ryanthompson - 2 months ago

That is incorrect usage I do believe - treat the field like carbon itself:

`post.publish_at.format("d/m/Y")`

That should work just fine: https://pyrocms.com/documentation/datetime-field-type/3.0/usage/presenter-output

ryanthompson - 2 months ago

That is incorrect usage I do believe - treat the field like carbon itself:

`post.publish_at.format("d/m/Y")`

That should work just fine: https://pyrocms.com/documentation/datetime-field-type/3.0/usage/presenter-output