How can I set Timezone in lumen 5.2? How can I set Timezone in lumen 5.2? laravel laravel

How can I set Timezone in lumen 5.2?


In Lumen 5.2 the Application class actually reads from a APP_TIMEZONE environment variable.

You can easily set timezone via a .env file using or setting the environment variable on your server:

APP_TIMEZONE=UTC


None of the responses I've read in a lot of forums solves the problem, because in the file /vendor/laravel/lumen-framework/config/database.php there is this line:

'mysql' => [            'driver'    => 'mysql',            'host'      => env('DB_HOST', 'localhost'),            'port'      => env('DB_PORT', 3306),            'database'  => env('DB_DATABASE', 'forge'),            'username'  => env('DB_USERNAME', 'forge'),            'password'  => env('DB_PASSWORD', ''),            'charset'   => env('DB_CHARSET', 'utf8'),            'collation' => env('DB_COLLATION', 'utf8_unicode_ci'),            'prefix'    => env('DB_PREFIX', ''),            **'timezone'  => env('DB_TIMEZONE', '+00:00'),**            'strict'    => env('DB_STRICT_MODE', false),        ],