今天装php程序时遇到一个错误:


Warning: phpinfo() [function.phpinfo]: 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 /var/www/html/index.php on line 3

查了一下,是php的时区问题


打开/etc/php.ini查找date.timezone 去掉前面的分号修改成为:date.timezone =PRC。重启apache就可以了。  

我们国内来说:RPC可以替换为:Asia/Chongqing ,Asia/Shanghai ,Asia/Urumqi (依次为重庆,上海,乌鲁木齐)港台地区可用:Asia/Macao ,Asia/Hong_Kong ,Asia/Taipei (依次为澳门,香港,台北),还有新加坡:Asia/Singapore,当然PRC也行


参考文章

http://blog.csdn.net/zhuying_linux/article/details/6203949