在用phpmyadmin导入的时候报错:
Warning: mktime() [function.mktime]: 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 in ···
这是因为PHP所取的时间是格林威治标准时间,所以和你当地的时间会有出入,格林威治标准时间和北京时间大概差8个小时左右,我们有两种方法解决:
1.在config.php文件的头部添加使用date_default_timezone_set()设置我的默认时区为北京时间,即:
date_default_timezone_set(“PRC”); //编程我干不了,所以pass
2.修改php.ini中的date.timezone的值为PRC:
date.timezone=PRC 重启apache即可。
原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/988.html