西部数码主机 | 阿里云主机| 虚拟主机 | 服务器 | 返回乐道官网
当前位置: 主页 > php教程 > ecshop教程 >

安装ecshop报错date_default_timezone_set的解决法

时间:2012-03-09 11:05来源:未知 作者:好模板 点击:
安装ecshop出现警告: Warning: 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 an

 安装ecshop出现警告: Warning: 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 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /data/wwwroot/includes/lib_time.php on line 28 OK

如图所示
QQ截图20120308001156.jpg 

我们可以打开init.php找到


if (PHP_VERSION >= '5.1' && !empty($timezone))
{
date_default_timezone_set($timezone);
}


改成

if (PHP_VERSION >= '5.1')
{
empty($timezone) date_default_timezone_set("PRC"):date_default_timezone_set($timezone);
}



就可以了,如果这样还是不行,就只有改php.ini,然后重启服务器

在php.ini中设置

date.timezone=PRC
 
好模板教程完毕,这个是时区问题

 

 

(责任编辑:好模板)
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------