Expand description
Time-range parsing for Datadog CLI commands.
Accepts three forms:
- Relative shorthand:
{N}{s|m|h|d|w}(e.g.15m,1h,7d). - Literal
now. - RFC 3339 timestamps (timezone required, e.g.
2026-04-22T10:00:00Z). - Unix epoch seconds (non-negative integer).
All results are returned as epoch seconds (i64) — the unit expected
by Datadog v1 query parameters.
Functions§
- parse_
instant - Parses a single time instant relative to
now. - parse_
time_ range - Parses a
(from, to)pair. WhentoisNone, defaults tonow.