Open kornelski opened 1 year ago
On a related note, chrono::serde module has functions for various numeric representations of dates, but not for rfc3339 and other string formats, so I can't use deserialize_with="rfc3339"
on DateTime<Utc>
.
Seems reasonable to have a Deserialize
impl for DateTime<Utc>
. Would you be willing to contribute one?
but not for rfc3339 and other string formats, so I can't use deserialize_with="rfc3339" on DateTime
.
Related to #544
serde::Deserialize
is implemented forDateTime<FixedOffset>
, but not forDateTime<Utc>
.This seems like an odd omission. It is inconvenient, because I prefer to use UTC dates exclusively in my application, but I can't use
DateTime<Utc>
in my structs (at least not without custom serde boilerplate or change of the serialized format from string to number).Since
DateTime<FixedOffset>
can be trivially converted toDateTime<Utc>
, I'd expect deserializing intoDateTime<Utc>
work exactly like deserializing intoDateTime<FixedOffset>
and then converting it to UTC.