gmmktime
int gmmktime(int hour, int minute, int second, int month, int day, int year)
hour | Hours |
minute | Minutes |
second | Seconds |
month | Numerical month |
day | Numerical day |
year | Year |
Creates a UNIX timestamp from a GMT date.
Returns:
UNIX timestamp if successful; -1 if 0 is given for each of month , day , and year
Description:
This function is like mktime() except that the returned UNIX time is formatted to GMT.
Version:
PHP 3, PHP 4
See also:
mktime() gmdate()
Example:
Create a UNIX timestamp from the GMT date and print it
$my_time = gmmktime(0, 0, 0, 4, 1, 1998); print(date("M-d-Y", $my_time)); |
Get PHP Functions Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.