본문 바로가기

리눅스

[PHP] php 코드에서 date_default_timezone_set() 설정

반응형

php 코드에서 date_default_timezone_set() 설정

[PHP Error 코드]
[Tue Jan 08 14:47:06 2013] [error] [client 10.0.10.102] PHP Warning: 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/Seoul' for 'KST/9.0/no DST' instead in /usr/share/doc/squirrelmail-1.4.22/phpinfo.php on line 2

# vi /etc/php.ini

[Date]
; Defines the default timezone used by the date functions
;
http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = ##
변경 전
date.timezone = Asia/Seoul ##
변경 후

 

 

728x90
반응형