use chrono::TimeDelta;
use serde::Serializer;

pub fn serialize_timedelta_as_seconds<S: Serializer>(
    delta: &TimeDelta,
    s: S,
) -> Result<S::Ok, S::Error> {
    s.serialize_i32(delta.num_seconds() as i32)
}
