关于ecshop在linux下Warning: date_default_timezone_get

2016-09-11 20:38 来源:www.chinab4c.com 作者:ecshop专家

ecshop报错提示:

Warning: date_default_timezone_get(): 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 sel ected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/nginx/html/ecshop/install/includes/lib_installer.php on line 223 Warning: date_default_timezone_get(): 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 sel ected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/nginx/html/ecshop/install/includes/lib_installer.php on line 223 Warning: date_default_timezone_get(): 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 sel ected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/nginx/html/ecshop/install/includes/lib_installer.php on line 223 Warning: date_default_timezone_get(): 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 sel ected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/nginx/html/ecshop/install/includes/lib_installer.php on line 223

打开/usr/local/nginx/html/ecshop/install/includes/lib_installer.php在223行把date_default_timezone_get()改为"Asia/Shanghai"

即:$local_timezone="Asia/Shanghai";

 

安装过程中出现错误:

Warning: date_default_timezone_get(): 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 sel ected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/nginx/html/ecshop/includes/cls_mysql.php on line 163 Warning: date_default_timezone_get(): 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 sel ected 'Asia/Chongqing' for 'CST/8.0/no DST' instead in /usr/local/nginx/html/ecshop/includes/cls_mysql.php on line 163 OK

修改php.ini,找到date.timezone,去掉分号改为date.timezone="Asia/Shanghai"

nginx下重启php服务,再次安装就成功。