The gmmktime() function returns a Unix timestamp for a GMT date. However, this function is identical to mktime() except the passed parameters represents a GMT date.
Syntax on gmmktime() Function PHP
Parameter & Description of gmmktime() Function PHP
hour- Optional. Specifies the hour
minute - Optional. Specifies the minute
second - Optional. Specifies the second
month - Optional. Specifies the numerical month
day - Optional. Specifies the day
year - Optional. Specifies the year. The valid range for year is on some systems between 1901 and 2038. However this limitation is overcome in PHP 5
is_dst - Optional. Parameters always represent a GMT date so is_dst doesn't influence the result.
Example of gmmktime() Function PHP:
$my_birthday = gmmktime(0,0,0,03,8,1978);
print($my_birthday . "<br />");
The output of the code above would be:
Posted on: August 28, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles