Answer the question
In order to leave comments, you need to log in
Misunderstanding of storing date-time(in UTC) in laravel base?
Good day.
Set for model
protected $dates = [
'created_at',
'updated_at',
'arrivalDate',
'dateOfDeparture',
];
'arrivalDate' => '2019-05-28 23:31:19',
'dateOfDeparture' => '2019-05-28 23:31:19',
Answer the question
In order to leave comments, you need to log in
How does he know what timezone your LINES are in (these are not dates, not even close)?
created_at and updated_at are created by a regular DateTime already in the required time zone, and are not converted (and should not be).
Do it in UserFactory 'arrival_date' => now()
and you will be happy.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question