chrono
chrono copied to clipboard
Any way to parse string into a zoned datetime?
Is there a way to do this with chrono-tz?
<chrono::DateTime::<chrono_tz::Tz> as std::str::FromStr>::from_str(value).or(Err(RangeError))?
Any ideas about converting it back to a string?
(The above doesn't compile.)
... Hm, I'm not sure if this string conversion is necessary. I'm writing a temporal-like API (from the TC39 proposal), but not a 1-1 mapping and would these locale-unaware strings be useful in pratice? I guess not...
Well, I guess it can be useful to have these strings, yes! For passing them around when developing things...
If anyone could help, I've posted here: https://users.rust-lang.org/t/help-with-chrono-and-chrono-tz/97917