This function returns a Unix timestamp for a GMT date.

Syntax:gmmktime(hour,minute,second,month,day,year,is_dst)

Description:

The first argument “hour” is Optional. It specifies the hour.

The second argument “minute” is Optional. It specifies the minute.

The third argument “second” is Optional. It specifies the second.

The fourth argument “month” is Optional. It specifies the numerical month.

The five argument “day” is Optional. It specifies the day.

The six argument “year” is Optional. It specifies the year. The valid range for year is on some systems between 1901 and 2038. However this limitation is overcome in PHP5

The sevent argument “is_dst” is Optional. It Set this parameter to 1 if the time is during daylight savings time (DST), 0 if it is not, or -1 (the default) if it is unknown. If it’s unknown, PHP tries to find out itself (which may cause unexpected results).

Note: This function is identical to mktime() except the passed parameters represents a GMT date.

Example:
Code:

$time = gmmktime(0,0,0,4,11,2011);
print($time . "
"); print(date("M-d-Y",$time));

Output:

1302480000
Apr-11-2011

eXTReMe Tracker