Laravel: created_at and updated_at is 2 hours in the future

Viewed 51

My system time is right, it's setted on CEST, because we're on italian.

Laravel app's timezone is righ: "Europe/Rome".

When laravel save a record, it is saved with 2 hour shift in the future,

We're NOT altering save and update time in no way.

I've zero idea of where/what to search.

My system is a debian 11

UPDDATE 1

Mysql timezone is setup as '@systemtimezone'

UPDATE 2

Restarting the server fixed problem without any explanation

1 Answers

You can set your App time zone by configuring app.php file in config folder.

To change time zone , modify the value of time zone in app.php file. 'timezone' => 'Europe/Rome'

php artisan config:clear

Configuration cache cleared!

php artisan config:cache

Configuration cache cleared! Configuration cached successfully!

php artisan route:clear

Route cache cleared!

php artisan route:cache

Route cache cleared! Routes cached successfully!

php artisan cache:clear

Application cache cleared!

Related