All time functions is using the timezone you set in config/app.php
, and so will Carbon
.
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'Europe/Stockholm',
maybe it should be better to use ini_get('date.timezone') instead of hardcode to use value from php config:
'timezone' => ini_get('date.timezone'),
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community