Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I was looking at the document the other day https://docs.lnav.org/en/latest/commands.html#goto-line-n-date
I think it needs a better description for jumping to a time point in a day e.g.:
:goto 2017-01-01T12:15:00

Right now, people have to guess from the document the format of the timestamp after the date. Also, it seems unintuitive to have to specify till seconds in order for it to work such that :goto 2017-01-01T20:00 (not specifying seconds) will not navigate to 20:00pm but to the first line in the day 2017-01-01.

You must be logged in to vote

Replies: 1 comment · 2 replies

Comment options

Right now, people have to guess from the document the format of the timestamp after the date.

The timestamp can be any of the builtin formats that lnav has, see https://github.com/tstack/lnav/blob/master/src/time_formats.am for the full list. You can also press TAB and one of the first suggestions is the timestamp of the top line in the view.

Also, it seems unintuitive to have to specify till seconds in order for it to work such that :goto 2017-01-01T20:00 (not specifying seconds) will not navigate to 20:00pm but to the first line in the day 2017-01-01.

It looks like the format without seconds was missing, I've added it in c24be23. I've also added a check to make sure the full timestamp is consumed. If it isn't, an error like the following should be shown:

Screen Region 2022-06-21 at 22 23 31

Thanks for the report!

You must be logged in to vote
2 replies
@alabamagan
Comment options

Seems like I happened to test the only few timestamps that haven't been specified. Thanks for looking into it!
Might still worth adding to the online docs though, perhaps replacing date with timestamp, otherwise people might think only date navigation is implemented.

@tstack
Comment options

I've changed date to timestamp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.