How can I set Timezone in lumen 5.2?

rap-2-h picture rap-2-h · Feb 8, 2016 · Viewed 13.1k times · Source

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?

Answer

edgji picture edgji · Feb 15, 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:

APP_TIMEZONE=UTC