I'm using Lumen 5.6 and on my local server (I don't have a production server yet) and all my timestamps (created_at, updated_at) are being stored natively in my local timezone (Amsterdam, +02:00). I would like this to be in UTC. I have done a standard lumen install I thought UTC was the default?
I have tried the following .env settings
APP_TIMEZONE='+00:00' #This does nothing no matter what I set it to
DB_TIMEZONE='+02:00' #This gets me UTC by offsetting the offset
These two configurations fail with or without quotes
APP_TIMEZONE='UTC'
DB_TIMEZONE='UTC'
# OR
APP_TIMEZONE='Africa/Timbuktu'
DB_TIMEZONE='Africa/Timbuktu'
I have also tried to explicitly set the timestamp column like so
$password_reset = PasswordReset::create([
'token' => Str::random(60),
'email' => $request->input('email'),
'created_at' => Carbon::now('UTC')->toDateTimeString()
]);
and the timestamps in my database are STILL offset by two hours. Highly frustrating. I am aware of all the Laravel fixes, none work. And it appears lumen 5.6 does not use an config/app.php like laravel, its all down to the .env file but nothing is working unless i "hack" the DB_TIMEZONE by "+02:00"