How to use gmmktime in PHP

This article describe about gmmktime() Function in PHP.
  • 1981

gmmktime() Function

The Unix timestamp for GMT return by the gmmktime() function.

Syntax

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

 

Parameter Description
hour Optional. define the hour
minute Optional. define the minute
second Optional. define the second.
month Optional. define the month.
day Optional. define the day.
year Optional. define the year in validation range 1901 to 2038.
is_dst Optional. parameter is 1 if time is daylight saving time, 0 if not or -1 if it is unknown.

Example

<html>
<body>
<?php
$my_birthday = gmmktime(0,0,0,10,6,1988);
print($my_birthday . "<br />");
print(date("M-d-Y",$my_birthday));
?>
</body>
</html>

 

Output


pic4.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.