- Method mktime
This function converts information about date and time into an integer which contains the number of seconds since 00:00:00 UTC, Jan 1, 1970.
You can either call this function with a mapping containing the following elements:
Seconds over the minute.
Minutes over the hour.
Hour of the day.
Day of the month.
Month of the year.
Year since 1900.
Is daylight-saving time active. If omitted or set to
-1, it means that the information is not available.
The timezone offset from UTC in seconds. If omitted, the time will be calculated in the local timezone.
Or you can just send them all on one line as the second syntax suggests.
For proper UTC calculations ensure that
isdst = 0and
timezone = 0; omitting either one of these parameters will mess up the UTC calculation.
On some operating systems (notably AIX and Win32), dates before 00:00:00 UTC, Jan 1, 1970 were not supported prior to Pike 9.0.
On most 32-bit systems, the supported range of dates is from Dec 13, 1901 20:45:52 UTC through to Jan 19, 2038 03:14:07 UTC (inclusive).
On most 64-bit systems, the supported range of dates is expressed in 56 bits and is thus practically unlimited (at least up to 1141 milion years in the past and into the future).
- See also