Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set the time zone for laravel5

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces how to set the time zone of laravel5, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let's take you to know it.

Laravel set the time zone method: 1, open the project under the "/ config/app.php" file; 2, in the "app.php", look for the "'timezone' = >" item, set the value of the item to the desired time zone identifier, such as "Asia/Shanghai" or "PRC".

The operating environment of this tutorial: windows7 system, Laravel5 version, Dell G3 computer.

The method of setting time zone in laravel

The time zone of laravel is the same as that of PHP. You can go to http://php.net/manual/zh/timezones.php to find the time zone identifier you need.

Look in / config/app.php under the project.

'timezone' = >' UTC'

Utc modifies the time zone identifier you need (that is, found in http://php.net/manual/zh/timezones.php)

For example, China has been revised to

'timezone' = >' Asia/Shanghai'

Or

'timezone' = >' PRC', thank you for reading this article carefully. I hope the article "how to set the time zone in laravel5" shared by the editor will be helpful to you. At the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report