Serialization to ISO 8601 #42924
Unanswered
lungu-catalin
asked this question in
General
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I'm migrating a booking application from Laravel 6 to 7 and I realized that the default format for the date is ISO 8601. This happen only for timestamp fields or for all date types?
For example:
TIMESTAMP field -> MyModel::first()->created_at returns "2020-02-18T07:42:08.000000Z"
DATETIME field -> MyModel::first()->field_1 returns "2020-12-25 00:00:00"
DATE field -> MyModel::first()->field_2 returns "2020-12-25 00:00:00"
TIME field -> MyModel::first()->field_3 returns "00:00:00"
Also only created_at allow toJson() method. So is my assumption right?
Beta Was this translation helpful? Give feedback.
All reactions