Repository navigation
firru.times: journalctl-style times with named windows; the LSPR24 example takes them - #9
Merged
Merged
Conversation
TimeParser reads what journalctl's --since/--until take (systemd.time(7)):
now, today/yesterday/tomorrow, a bare HH:MM, a day followed by a time,
anything datetime.fromisoformat reads, relative times (-30min, '1h 30min
ago'), and a ' UTC' suffix. The one addition is named windows, which stand
where journalctl takes `today`: a name is the window's start, or with
end=True its end, and 'day0 12:00' is that hour on its first day.
The zone is a fixed offset, UTC unless given, never the machine's: day
names resolve in it, relative times are elapsed time, and `now` is
injected for tests.
lspr24_to_flows.py and listening_split.py take their windows from one
parser at UTC+02. --since/--until replace --start/--end ('YYYY-MM-DD HH'),
--window stays, and the window used is printed in UTC before any flow.
Every named window resolves to the boundaries the old conversion gave; on
the parquet, `--since "d2 09:00" --until "d2 09:01"` and the same minute
written in UTC select the same 7,702 flows, all inside 07:00-07:01Z.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
firru.timesparses the timesjournalctl --since/--untiltakes (systemd.time(7)), plus named windows, so a command can say--since "day1 09:00"instead of an epoch or an ISO string.now,today/yesterday/tomorrow, a bareHH:MM, a day followed by a time, anythingdatetime.fromisoformatreads, relative times (-30min,1h 30min ago), and aUTCsuffix.today. A name alone is the window's start (its end withend=True), andday0 12:00is that hour on the window's first day.nowis injected for tests.The LSPR24 example uses it:
lspr24_to_flows.pyandlistening_split.pytake their windows from one parser at UTC+02.--since/--untilreplace--start/--end;--windowstays.Checks:
--since "d2 09:00" --until "d2 09:01"and the same minute written in UTC select the same 7,702 flows, all inside 07:00–07:01Z.Wiring the windows into
firru.tomland the other commands comes later; this PR only adds the parser and uses it in the example.🤖 Generated with Claude Code