php로 웹 개발할때 date함수를 사용하면 아래와 같은 warning이 뜹니다.

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 the timezone 'UTC' for now, but please set date.timezone to select your timezone. in

이 경고를 해결하기 위한 방법입니다.


1. /etc/php.ini 에서 datatimezone = Asia/Seoul 로 바꿔줍니다. 



2. php 위에 date_default_timezone_set('Asia/Seoul'); 를 추가합니다.

'Language > PHP' 카테고리의 다른 글

IF문에서 신기한것  (0) 2017.12.18

+ Recent posts