Skip to content

feat: support absolute ISO 8601 timestamps in --since/--until#21

Open
noexecstack wants to merge 1 commit intomainfrom
feat/loki-absolute-timestamps
Open

feat: support absolute ISO 8601 timestamps in --since/--until#21
noexecstack wants to merge 1 commit intomainfrom
feat/loki-absolute-timestamps

Conversation

@noexecstack
Copy link
Copy Markdown
Owner

Summary

  • --since and --until now accept ISO 8601 timestamps (e.g. 2026-03-27T20:00:00, 2026-03-27) in addition to relative durations
  • Enables querying specific time windows like "Friday night to Sunday morning"
  • Version bump to 0.8.0

Changes

  • Added _parse_timestamp() and _parse_time_arg() for dual-mode parsing
  • Refactored _read_flows_loki() to accept absolute epoch timestamps
  • Updated CLI help text, README examples, and flag reference table
  • Added tests for all new parsing functions

Test plan

  • All 144 existing tests pass
  • ruff clean
  • mypy clean
  • Manual: --since 2h (relative, unchanged behavior)
  • Manual: --since 2026-03-27T20:00:00 --until 2026-03-29T08:00:00 (absolute)
  • Manual: --since 2026-03-27 (date-only shorthand)

The --since and --until flags now accept ISO 8601 timestamps
(e.g. 2026-03-27T20:00:00, 2026-03-27) in addition to relative
durations (2h, 30m). This allows querying specific time windows
such as "Friday night to Sunday morning" instead of only
relative offsets from now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant