상세 컨텐츠

본문 제목

PHP Warning: date(): It is not safe to rely on the system's timezone settings 타임존 에러

php

by 2hansoul 2021. 9. 9. 22:01

본문

반응형

PHP 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 /var/www/html/join/joinaction1.php on line 9, referer: http://192.168.56.137/join/joincome.php

 

1.php.ini 파일에서 timezone 설정하기 

[root@localhost httpd]# vi /etc/php.ini 

2.php 코드내에 timezone 설정하기

date 사용하기 전에 코드 삽입

date_default_timezone_set('Asia/Seoul');


1번으로 설정 해놓는게 그냥 마음이 편한 것 같다

 

반응형

'php' 카테고리의 다른 글

암호화 종류 scrypt / bcrypt / PBKDF2  (0) 2021.09.13
암호화 단방향 복호화 해싱  (0) 2021.09.10
[PHP] 5.2 버전 이하 암호하  (0) 2021.09.08
[PHP] 암호화  (0) 2021.09.07
해시(hash) 솔트(salt) 암호화 기법  (0) 2021.09.06

관련글 더보기

댓글 영역