Home Ask Login Register

Developers Planet

Your answer is one click away!

rap-2-h February 2016

How can I set Timezone in lumen 5.2?

I did not find any relevant information (only tricks) about how to set the default timezone in Lumen 5.2. Is there any clean way to do this?


paranoid February 2016

In config/app.php
you can change it

'timezone' => 'UTC',

Oliver Queen February 2016

This is pretty easily done and shown in their documentation page:

To set configuration values at runtime, pass an array to the config helper:

config(['app.timezone' => 'America/Chicago']);

Alternatively, in app/config.php:

'timezone' => 'UTC',

edgji February 2016

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:


Post Status

Asked in February 2016
Viewed 1,459 times
Voted 7
Answered 3 times


Leave an answer

Quote of the day: live life