I have a problem with postgres connection that not respect the config in app.php at timezone.
config/app.php
'timezone' => 'UTC',
My notebook (local server) is a timezone at Brasilia, but not is that want to use in my application. I want to use a UTC timezone, and I believe that if the connections to the database do not respect the application's timezone setting, then this is a Laravel 5 bug
I have a issue about this case:
My provisory solution in User model:
/**
* Setting UTC timezone with mutator.
*
* @param $value
* @return Carbon
*/
public function getLastLoggedInAtAttribute($value)
{
return Carbon::createFromTimestampUTC(strtotime($value));
}
See more: http://stackoverflow.com/a/43283869/3332734
References:
https://laravel.com/docs/master/eloquent#eloquent-model-conventions
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community