如何在cakephp中设置默认时区? [英] How do I set default timezone in cakephp?
本文介绍了如何在cakephp中设置默认时区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我有一个系统,大多是完成,只是熨掉一些最终的错误。我们有一个问题,该程序似乎永久设置在纽约时区。
So I have a system that is mostly finished, just ironing out some final bugs. We have an issue that the program seems to be permanently set in the New York timezone.
我有这行代码在core.php和bootstrap.php: / p>
I have this line of code in both core.php and bootstrap.php:
date_default_timezone_set("Australia/Melbourne");
但系统会继续报告其位于美国/纽约州。
But the system keeps reporting that it is in America/NewYork.
任何人都可以帮我将时区设置为澳大利亚墨尔本?
Can anyone help me set the timezone to Australia Melbourne?
推荐答案
> config / core.php 应用程序文件夹中的文件尝试以下单引号:
In the config/core.php
file of the app folder try the following with single quotes:
date_default_timezone_set('Australia/Melbourne');
这篇关于如何在cakephp中设置默认时区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文