Learning PHP
Advanced PHP
PHP Function Reference
PHP Useful Resources
Selected Reading
© 2011 TutorialsPoint.COM
|
PHP Function gmmktime()
Syntax
int gmmktime(hour,minute,second,month,day,year,is_dst);
|
Definition and Usage
This function is identical to mktime() except the passed parameters represents a GMT date. gmmktime() internally uses mktime() so only times valid in derived local time can be used.
Paramters
Parameter | Description |
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. |
is_dst | Optional. Parameters always represent a GMT date so is_dst doesn't influence the result. |
Return Value
Returns a integer Unix timestamp.
Example
Following is the usage of this function:
<?php
$timestamp = gmmktime(0,0,0,8,6,1971);
print($timestamp . "\n");
?>
|
This will produce following result:
|
| |