Name

mktime

Synopsis

int mktime(int hours, int minutes, int seconds, int month,
    int day, int year [, int is_dst])

Returns the Unix timestamp value corresponding to the parameters, which are supplied in the order hours, minutes, seconds, month, day, year, and (optionally) whether the value is in Daylight Savings Time. This timestamp is the number of seconds elapsed between the Unix epoch and the given date and time.

The order of the parameters is different from that of the standard Unix mktime() call, to make it simpler to leave out unneeded arguments. Any arguments left out are given the current local date and time.

Get Programming PHP, 3rd Edition 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.