diff --git a/config/config.default.php b/config/config.default.php index fd4ff5a6..38d88acc 100644 --- a/config/config.default.php +++ b/config/config.default.php @@ -115,7 +115,7 @@ return [ 'max_freeloadable_shifts' => 2, // Local timezone - 'timezone' => env('TIMEZONE', 'Europe/Berlin'), + 'timezone' => env('TIMEZONE', ini_get('date.timezone') ?: 'Europe/Berlin'), // Multiply 'night shifts' and freeloaded shifts (start or end between 2 and 6 exclusive) by 2 'night_shifts' => [ diff --git a/includes/application.php b/includes/application.php index 418dd08d..b62b082e 100644 --- a/includes/application.php +++ b/includes/application.php @@ -24,7 +24,8 @@ $app->bootstrap($appConfig); /** * Configure application */ -date_default_timezone_set($app->get('config')->get('timezone')); +$timezone = $app->get('config')->get('timezone'); +ini_set('date.timezone', $timezone); if (config('environment') == 'development') { $errorHandler = $app->get('error.handler');