pub fn deserialize<'de, D>(deserializer: D) -> Result<DateTime<Utc>, D::Error> where D: Deserializer<'de>,
    {
        Utc.timestamp_opt(i64::deserialize(deserializer)?, 0)
            .single() // If there are multiple or no valid DateTimes from timestamp, return None
            .ok_or_else(|| serde::de::Error::custom("invalid Unix timestamp value"))
    }
/// Attempts to deserialize an i64 and use as a Unix timestamp
Attempts to deserialize an i64 and use as a Unix timestamp
Attempts to deserialize an i64 and use as a Unix timestamp
pub fn deserialize<'de, D>(deserializer: D) -> Result<DateTime<Utc>, D::Error> where D: Deserializer<'de>,
    {
        Utc.timestamp_opt(i64::deserialize(deserializer)?, 0)
            .single() // If there are multiple or no valid DateTimes from timestamp, return None
            .ok_or_else(|| serde::de::Error::custom("invalid Unix timestamp value"))
    }
pub fn deserialize < ' de , D > ( deserializer : D ) -> Result < DateTime < Utc > , D :: Error > where D : Deserializer < ' de > , { Utc . timestamp_opt ( i64 :: deserialize ( deserializer ) ? , 0 ) . single ( ) // If there are multiple or no valid DateTimes from timestamp, return None . ok_or_else ( | | serde :: de :: Error :: custom ( " " ) ) }
Attempts to deserialize an i64 and use as a Unix timestamp
Attempts to deserialize an i64 and use as a Unix timestamp
deserializer
D
deserializer
D