I came across this example for using custom date formats when using serde and chrono together. The example uses the function Utc.datetime_from_str, which is deprecated since chrono version 0.4.29.
This PR changes the example to use NaiveDateTime::parse_from_str(&self, s: &str, fmt: &str), keeping it simple to understand and without using deprecated code.
I came across this example for using custom date formats when using serde and chrono together. The example uses the function
Utc.datetime_from_str
, which is deprecated since chrono version 0.4.29.This PR changes the example to use
NaiveDateTime::parse_from_str(&self, s: &str, fmt: &str)
, keeping it simple to understand and without using deprecated code.