It is not safe to rely on the system's timezone settings.

来源:互联网 发布:网络监控用什么软件 编辑:程序博客网 时间:2024/06/07 03:52

访问Yii框架自带的例子系统时,页面打印500错误:

date() [<a href='function.date'>function.date</a>]: 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 'UTC' for '8.0/no DST' instead

经查和试验解决方案为:

在php.ini中设置时区:
date.timezone = "Asia/Shanghai"

或者在网页开头中加入:
<?php
date_default_timezone_set("PRC");
?>


0 0
原创粉丝点击