访问Yii框架自带的例子系统时,页面打印500错误:
Error 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"
或者在网页开头中加入:
<?phpdate_default_timezone_set("PRC");?>