" item and set the value of this item to the required time zone identifier, such as "Asia/Shanghai" or "PRC"."/> " item and set the value of this item to the required time zone identifier, such as "Asia/Shanghai" or "PRC".">

Home>Article>PHP Framework> How to set time zone in laravel5

How to set time zone in laravel5

青灯夜游
青灯夜游 Original
2021-09-23 18:16:19 3309browse

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".

How to set time zone in laravel5

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn