Home>Article>PHP Framework> How to set time zone in laravel5
How to set the time zone in laravel: 1. Open the "/config/app.php" file under the project; 2. In "app.php", look for the "'timezone' =>" item and change The value of this item is set to the required time zone identifier, such as "Asia/Shanghai" or "PRC".
The operating environment of this tutorial: Windows 7 system, Laravel version 5, Dell G3 computer.
How to set time zone in laravel
Laravel’s time zone is the same as PHP’s time zone. You can go to http://php.net/manual/zh/timezones.php to find the time zone identifier you need.
Go to /config/app.php under the project and find
'timezone' => 'UTC',
utc to modify the time zone identifier you need (that is, at http://php.net/manual/ zh/timezones.php found)
For example, in China, change it to
'timezone' => 'Asia/Shanghai',
or
'timezone' => 'PRC',
Related recommendations:The latest five Laravel videos Tutorial
The above is the detailed content of How to set time zone in laravel5. For more information, please follow other related articles on the PHP Chinese website!