A
A
Artem00712018-03-28 18:05:38
Laravel
Artem0071, 2018-03-28 18:05:38

How to add UTC00:00 to all models?

I need to make laravel output dates in ISO 8601 format
, that is, in the form 2004-02-12T15:19:21+00:00
Now, according to the standard, laravel displays everything in this form: 2018-03-28 14:50: 06
I looked that you can set $dateFormat, but with any change, the following error occurs:

InvalidArgumentException with message 'Trailing data'

I understand that this is due to the fact that dates are written in a different format in the database
. In general, how to make them appear in a new format?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question