change timezone in laravel database

Spread the love

if you are using any column that is saving date or time using timestamps() or you are inserting / updating time from query.Then you might have problem of timezone.Your hours maybe storing ahead or back of your computer machine.So how you will solve it ?

Here is a solution to set your current timezone in laravel

You can set the timezone in your config/app.php file, for instance if you are in india (your timezone) your should do this:

you can change this timezone according to you or your client’s residence.For a full list of supported  timezones in php please follow this link http://php.net/manual/en/timezones.asia.php

Leave a Reply

Your email address will not be published. Required fields are marked *