mktime

int mktime([int hour], [int min], [int sec], [int mon], 
 [int day], [int year], [int is_dst]) 
hour Numeric hours
min Numeric minutes
sec Numeric seconds
mon Numeric month
day Numeric day
year Numeric year
is_dst Whether Daylight Saving Time is active

Returns the UNIX timestamp for a date.

Returns:

UNIX timestamp if successful; -1 if 0 is given for each of month , day , and year

Description:

mktime() calculates the UNIX timestamp for the time and date given by its parameters. All parameters are optional; if a parameter isn’t specified, the current time is used for that parameter. However, keep in mind that arguments can only be left off in order from right to left (for example, you can’t leave out day without first leaving out ...

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.