Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP gmmktime() Function

PHP gmmktime() Function

PHP Date/Time PHP Date/Time Reference Manual

Example

Return the UNIX timestamp of a GMT date, then use it to find the day of that date:

Run Example »


Definition and Usage

The gmmktime() function returns the UNIX timestamp of a GMT date.

**Tip:** The difference between this function and mktime() Same as mktime(), except that the passed parameters represent a GMT date.

Syntax

gmmktime(

hour,minute,second,month,day,year,is_dst

);

Parameters 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. The parameters always represent a GMT date, so is_dst does not affect the result. **Note:** This parameter was deprecated in PHP 5.1.0; use the new time zone handling features instead.

Technical Details

Return Value: Returns an integer Unix timestamp.
PHP Version: 4+
Changelog: PHP 5.1.0:is_dst This parameter was deprecated.

PHP Date/Time PHP Date/Time Reference Manual