L
L
Leopandro2019-11-21 19:19:55
Laravel
Leopandro, 2019-11-21 19:19:55

Laravel keeps local date and time anyway?

I store the date like this:

'updated_at' => Carbon::now()->tz('UTC')->toDateTimeString()

disabled timestamps for model
date saved as $table->timestamps
before saving updated_at is 16:09 after saving is still 19:09

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