gmmktime
(PHP 4, PHP 5)
gmmktime — Get Unix timestamp for a GMT date
설명
int gmmktime
([ int $hour
[, int $minute
[, int $second
[, int $month
[, int $day
[, int $year
[, int $is_dst
]]]]]]] )
Identical to mktime() except the passed parameters represents a GMT date. gmmktime() internally uses mktime() so only times valid in derived local time can be used.
Like mktime(), arguments may be left out in order from right to left, with any omitted arguments being set to the current corresponding GMT value.
매개변수
- hour
-
The hour
- minute
-
The minute
- second
-
The second
- month
-
The month
- day
-
The day
- year
-
The year
- is_dst
-
Parameters always represent a GMT date so is_dst doesn't influence the result.
반환값
Returns a integer Unix timestamp.
변경 기록
버전 | 설명 |
---|---|
5.1.0 | As of PHP 5.1.0, the is_dst parameter became deprecated. As a result, the new timezone handling features should be used instead. |
예제
Example#1 gmmktime() on Windows boundary
<?php
gmmktime(0, 0, 0, 1, 1, 1970); // valid in GMT and west, invalid in east
?>