PHP: getdate()错误

PHP5中当在ini中指定错误级别为E_STRICT时,可能导致getdate出现如下错误:

getdate() [function.getdate]: It is not safe to rely on the system’s timezone settings. Please use the date.timezone setting, the TZ environment variable 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.

解决办法可以在 getdate() 前面加上:

date_default_timezone_set(’时区名’);

时区名如:Asia/Hong_Kong,时区列表可以参看这里

Social Bookmark: Delicious   Digg   Facebook   Stumblue   Technorati  

1 Comment(s)

  1. Comment by zerg on June 6, 2007 6:24 pm

    thank you!

Comments RSS TrackBack Identifier URI

Leave a comment

Comment spam protected by SpamBam