Skip to main content

parse_log_timestamp

Function parse_log_timestamp 

Source
pub fn parse_log_timestamp(raw: &str) -> Option<u64>
Expand description

Parse a log timestamp that is either a bare Unix epoch (seconds) or an ISO-8601 UTC string YYYY-MM-DDTHH:MM:SSZ, returning epoch seconds (#opslogts). The trailing Z is optional. Returns None on anything that is neither, so the staleness/gate scanners skip a malformed line.