Join WhatsApp ChannelJoin Now

Set Indian Timezone in Laravel

Hi Dev,

In this post, I will show you how to set Indian time zone in Laravel

By default, Laravel uses UTC time zone. We can set it for India or any other country. Here we are showing you how to set Indian time zone. Let’s set the Indian time zone to `Asia/Kolkata`. We can apply this time zone in two ways:

Step 1: Update timezone .env file

.env

APP_TIMEZONE="Asia/Kolkata"

Step 2: Update timezone config file

'timezone' => 'Asia/Kolkata',

You can find out if the time zone is set correctly by following route code

Route::get('/', function () {
    dd(now());
});

I hope it will assist you…

Recommended Posts