Development/PHP

php - date() 오류

linuxism 2012. 7. 21. 07:56


php5.3에서 date문제

오랜만에 xampp를 1.7.2로 업글하니 불당팩 최신버전인 4.31.13 - 1.0.51에서 아래 겨고가 나오네요.

Warning: date() [function.date]: 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/Seoul' for 'KST/9.0/no DST' instead in /var/www/html/iptime/config.php on line 29

config.php 25번 라인에 한 줄 추가하니 해결되었음.
$g4['server_time'] = time();
date_default_timezone_set("Asia/Seoul");


출처 - http://neowindstory.egloos.com/2734313