pub unsafe extern "C" fn aws_date_time_init_from_str(
dt: *mut aws_date_time,
date_str: *const aws_byte_buf,
fmt: aws_date_format
) -> c_int
Expand description
Initializes dt to be the time represented by date_str in format ‘fmt’. Returns AWS_OP_SUCCESS if the string was successfully parsed, returns AWS_OP_ERR if parsing failed.
Notes for AWS_DATE_FORMAT_RFC822: If no time zone information is provided, it is assumed to be local time (please don’t do this).
If the time zone is something other than something indicating Universal Time (e.g. Z, UT, UTC, or GMT) or an offset from UTC (e.g. +0100, -0700), parsing will fail.
Really, it’s just better if you always use Universal Time.