Skip to main content

parse_when

Function parse_when 

Source
pub fn parse_when(input: &str, now: SystemTime) -> Result<SystemTime>
Expand description

Parse a WHEN value into an absolute instant.

Accepts now, a compound age (200ms, 45s, 2h, 1h30m), an RFC 3339 timestamp carrying an offset (2026-08-10T18:22:31.482919114Z), or @ seconds since the Unix epoch (@1786413716, @1786413716.482919114).

Ages subtract from now, so a caller that captures one instant per invocation gets a consistent window across several arguments.