PHP gmmktime() 함수
예시
GMT 날짜에 대한 Unix 타임스탬프를 반환합니다. 그런 다음 해당 날짜의 요일을 찾는 데 사용합니다.
<?php
// Prints: October 3, 1975 was on a Friday
echo "Oct 3, 1975 was on a ".date("l", gmmktime(0,0,0,10,3,1975));
?>
정의 및 사용
gmmktime() 함수는 GMT 날짜에 대한 Unix 타임스탬프를 반환합니다.
팁: 이 함수는 전달된 매개변수가 GMT 날짜를 나타내는 것을 제외하고 mktime() 과 동일합니다.
통사론
gmmktime(hour, minute, second, month, day, year, is_dst)
매개변수 값
Parameter | Description |
---|---|
hour | Optional. Specifies the hour |
minute | Optional. Specifies the minute |
second | Optional. Specifies the second |
month | Optional. Specifies the month |
day | Optional. Specifies the day |
year | Optional. Specifies the year |
is_dst | Optional. Parameters always represent a GMT date so is_dst doesn't influence the result. Note: This parameter is removed in PHP 7.0. The new timezone handling features should be used instead |
기술적 세부 사항
반환 값: | 정수 Unix 타임스탬프를 반환합니다. |
---|---|
PHP 버전: | 4+ |
PHP 변경 로그: | PHP 5.1: is_dst 매개변수가 더 이상 사용되지 않습니다 . PHP 7.0: is_dst 매개변수가 제거되었습니다 . |
❮ PHP 날짜/시간 참조