scout_rs 0.95.95

A Rust client for the synchornizing state with the Scout database
Documentation
1
2
3
4
5
6
7
8
//! Small time parsing helpers shared by tag enrichment and edge services.

/// RFC3339 / ISO-8601 string → Unix seconds (fractional).
pub fn parse_rfc3339_to_unix_secs(s: &str) -> Option<f64> {
    chrono::DateTime::parse_from_rfc3339(s)
        .ok()
        .map(|dt| dt.timestamp() as f64 + dt.timestamp_subsec_nanos() as f64 / 1e9)
}