【发布时间】:2013-04-04 09:16:21
【问题描述】:
我正在使用简码在我的博客页面上显示PHP Date Picker。但低于警告。
Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Australia/Perth' for 'WST/8.0/no DST' instead in /home/xxx/public_html/wp-content/plugins/xxx/calendar/calendar_form.php on line 48
我的服务器 PHP 版本是:5.3.19
如何消除此警告?
我试图隐藏 PHP 警告但没有成功,仍然收到警告。
error_reporting(E_ALL^ (E_WARNING | E_NOTICE));
我也尝试将时区设置为:
date_default_timezone_set('Australia/Perth');
但没有运气。
现在需要你们的帮助。谢谢...
【问题讨论】:
-
你试过在php.ini中设置默认时区吗?
-
正在我客户的服务器上工作,无法更改。
-
这个答案在我的情况下不起作用:stackoverflow.com/questions/5535514/…。我已经在我的问题中提到我尝试了
error_reporting()和date_default_timezone_set()但没有运气。
标签: php wordpress date warnings