parse_date_basic()
#
Parses a date string into a timestamp and timezone offset. The function supports various date formats and extracts the corresponding Unix timestamp and timezone offset.
Prototype
int parse_date_basic(
const char *date,
timestamp_t *timestamp,
int *offset
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The input date string to be parsed. |
|
|
Pointer to store the parsed Unix timestamp. |
|
|
Pointer to store the parsed timezone offset in minutes. |
Return Value
Returns 0 on success, or -1 if the date string could not be parsed.
Notes
This function is used internally by approxidate_careful()
and approxidate_relative()
to interpret date strings in various formats.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples