time::serde::timestamp::option

Function serialize

Source
pub fn serialize<S: Serializer>(
    option: &Option<OffsetDateTime>,
    serializer: S,
) -> Result<S::Ok, S::Error>
Available on crate feature serde only.
Expand description

Serialize an Option<OffsetDateTime> as its Unix timestamp