mktime()
int mktime ([ int $hour = date("H") [, int $minute = date("i") [, int $second = date("s") [, int $month = date("n") [, int $day = date("j") [, int $year = date("Y") ]]]]]] )
Description
mktime() returns the Unix timestamp corresponding to the given arguments.
※ available F/W version : all
Parameters
- $hour - specifies the hour, the result of date("H") if this parameter is omitted
- $minute - specifies the minute, the result of date("i") if this parameter is omitted
- $second - specifies the second, the result of date("s") if this parameter is omitted
- month - specifies the month, the result of date("n") if this parameter is omitted
- day - specifies the day, the result of date("j") if this parameter is omitted
- year - specifies the year, the result of date("Y") if this parameter is omitted
Return values
Returns the Unix timestamp corresponding to the given arguments.
Example
<?php
$stime = mktime(20,30,0,6,4,2002);
$str = date("Y:M-d-TH:i:s", $stime); // OUTPUT: date = 2002:Jun-04-T20:30:00
echo "date = $str\r\n";
?>
See also
date() / time()
Remarks
This function is identical to the PHP group’s mktime() function.