smarty strftime() error
Warning: strftime() [function.strftime]: 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.ini里date.timezone有这么一行;date.timezone =将;去掉,改成date.timezone = PRC,就OK了(PRC:People's Republic of China中华人民共和国)
2种.
在代码中增加如下命令:<?php date_default_timezone_set('Asia/Chongqing');?>
其它说明:
date.timezone = 的值,大陆内地可用的有:Asia/Chongqing ,Asia/Chungking,Asia/Harbin,Asia/Shanghai ,Asia/Urumqi (依次为重庆,哈尔滨,上海,乌鲁木齐)
港台地区可用的有:Asia/Macao ,Asia/Macau,Asia/Hong_Kong ,Asia/Taipei (依次为澳门,香港,台北),不区分大小写。