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

 

解决办法: 


 

1种.

查找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 (依次为澳门香港台北),不区分大小写。 

posted @ 2012-05-20 15:16  weiwei~  阅读(241)  评论(0编辑  收藏  举报