I am trying to run the following Code on a Windows 11 machine, latest chrono version, latest Rust version, but it fails with the error mentioned below:
let date = "Thu Feb 21 23:30:39 2012";
let date = DateTime::parse_from_str(date, "%a %b %d %H:%M:%S %Y");
if let Ok(x) = date {
dbg!(&x);
} else if let Err(x) = date {
dbg!(&x);
}
A DateTime must include a timezone. Your formatting string does not include any timezone formatter. Perhaps you want to parse a NaiveDateTime instead and supply the timezone separately?
I am trying to run the following Code on a Windows 11 machine, latest chrono version, latest Rust version, but it fails with the error mentioned below:
Am I doing something wrong or is this a bug?