ParseTime

Last Updated2023-07-04
Created At2023-07-04

Parses a string representing a date and/or time into a unix timestamp. The timezone is always interpreted as UTC/GMT. See this URL for valid parameters: https://en.cppreference.com/w/cpp/io/manip/get_time Note that available parameters depends on support from your operating system. In particular, ones highlighted in yellow on that page are not currently available on Windows and should be avoided for portable plugins.

native int ParseTime(const char[] dateTime, const char[] format)

Parameters

const char[] dateTime
Date and/or time string.
const char[] format
Formatting rules (passing NULL_STRING will use the rules defined in sm_datetime_format).

Return Value

int 32bit timestamp (number of seconds since unix epoch).

Error

Invalid date/time string or time format.