Signature
native parse_time(const input[], const format[], time = -1);
Description
Converts time strings to unix time stamp.
Notes
-
Uses the strptime C function. For a list of valid format parameters,
see: http://www.cplusplus.com/reference/ctime/strftime/
An example for a input/format combination would be:
Input: "10:32:54 04/02/2013" Format: "%H:%M:%S %m:%d:%Y"
-
Information missing from the input will be filled with the current
time and date.
Parameters
- input — Time string to convert
- format — Formatting information for conversion
-
time
—
If different from -1, the converted time will be added to
this time stamp
Returns
Unix time stamp
Errors
- If the conversion process fails, an error will be thrown.