MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / parse_timestamp

Function parse_timestamp

src/accounting/parser.rs:168–171  ·  view source on GitHub ↗

Parse an ISO 8601 / RFC3339 timestamp (e.g. `2026-04-14T10:32:15.039Z`) to unix epoch seconds via the shared zero-dependency parser, which also validates calendar fields and applies explicit `±HH:MM` offsets.

(ts: &str)

Source from the content-addressed store, hash-verified

166/// to unix epoch seconds via the shared zero-dependency parser, which also
167/// validates calendar fields and applies explicit `±HH:MM` offsets.
168pub(crate) fn parse_timestamp(ts: &str) -> Option<u64> {
169 let secs = crate::timeutil::parse_rfc3339_timestamp(ts)?;
170 u64::try_from(secs).ok()
171}
172
173/// Stats returned by the `ingest` function.
174pub struct IngestStats {

Callers 2

parse_lineFunction · 0.85
test_parse_timestampFunction · 0.85

Calls 1

parse_rfc3339_timestampFunction · 0.85

Tested by 1

test_parse_timestampFunction · 0.68