Skip to main content

deserialize_optional_icinga_timestamp

Function deserialize_optional_icinga_timestamp 

Source
pub fn deserialize_optional_icinga_timestamp<'de, D>(
    deserializer: D,
) -> Result<Option<OffsetDateTime>, D::Error>
where D: Deserializer<'de>,
Expand description

deserializes an optional unix timestamp with sub second accuracy (usually 6 digits after the decimal point for icinga) if the value is 0 return None

ยงErrors

returns an error if the value can not be parsed as an f64 or if it can not be converted from a unix timestamp to a time::OffsetDateTime