Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

luckydead's avatar

Laravel app Timezone

Hello i have a small question that i need to understand. So i have changed in my app.config file this setting: 'timezone' => env('APP_TIMEZONE', 'UTC'), and i have added in env file this line: APP_TIMEZONE='Europe/Sofia'

so my question now is this: When i input this Europe/Sofia website will use this as default time ? and my executable like this:

where('date',Carbon::now()->format('Y-m-d'))->where('status','enabled')->first();

is it going to read the same time as myself what is the time at the moment or i need to change something else to make the website to use the same hour and time from the env
0 likes
4 replies
Snapey's avatar

open tinker and type config('app.timezone')

There you will see the answer.

Note that it is best practice to run the system un UTC and apply the user's timezone to anywhere you display a date/time.

luckydead's avatar

@Snapey but lets say we use webhosting to store our website and in env i set up the timezone, my question was is it going to use for the whole website this timezone time from the env or each executable i must change ?

Snapey's avatar

@luckydead The timezone is applied across the system. You don't need to change anything else.

johndivam's avatar
Level 2

go to config\app.php and edit to 'timezone' => 'Europe/Sofia'

Please or to participate in this conversation.