How to covert a PostgreSQL timestamp (with time zone) to Rust Chrono DateTime<Utc>?
Example: 2020-04-12 22:10:57.0+02
How to covert a PostgreSQL timestamp (with time zone) to Rust Chrono DateTime<Utc>?
Example: 2020-04-12 22:10:57.0+02
Copyright © 2021 Jogjafile Inc.
You have to use the custom parser from
str:Extra info:
%.f=>.026490: Similar to.%fbut left-aligned. These all consume the leading dot.%#z=>+09: Parsing only: Same as%zbut allows minutes to be missing or present.For more info, see this awnser.