Warning: 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 (php파일명) on line 138


위의 에러는 timezone이 세팅되어있지 않아서 발생한 문제인데, 해결방법은 다음과 같다. 

  php 코드에서 timezone을 설정 
date() 함수를 사용하기 전에 php 코드에 다음과 같은 코드를 박아준다. 

date_default_timezone_set('Asia/Seoul');

 


  php.ini 파일에서 timezone 설정 

$>vi php.ini

...
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = Asia/Seoul
...

 

'프로그래밍' 카테고리의 다른 글

알파 버전 / 베타 버전 / RC  (0) 2016.04.04
MySQL Check 제약  (0) 2016.03.29
한글 인코딩 종류  (0) 2015.09.30
PHP 날짜함수 정리  (0) 2015.08.24
MySQL Type 종류  (0) 2015.08.19
Posted by 캐논볼
,