I am using this in a seeder:
'created_at' => Carbon::now(),
'updated_at' => Carbon::now(),
And am getting the correct date/time, but it is exactly 1 day ahead.
I have tried:
Carbon::now(new DateTimeZone('America/Chicago')),
In my seeder files, and it seems to work. However, when I am inserting records from a controller, the date is incorrect.
I am using $table->timestamps();
to create the columns - is there a configuration setting that I can enter the correct time zone? Or, is there something else I am doing wrong?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2gEe8iR
via IFTTT
Aucun commentaire:
Enregistrer un commentaire