mleontenko
3 months ago
390
2
General

Display time with timezone

Posted 3 months ago by mleontenko

I have a Post model that contains creation date in timestamp without timezone:

$table->dateTime('creation_date');

Example: 2020-05-22 09:54:34

It seems to store dateTime in GMT time zone andshows it like that in my view:

{{ date('d.m.Y. H:i', strtotime($post->creation_date)) }}

I want to convert it to local timezone in view. How can I do that?

Please sign in or create an account to participate in this conversation.