New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set a permanant time_offset? #732
Comments
No luck eh? |
What version of lnav are you using? The offset is supposed to be saved in the session, so it might be a bug if that is not happening. Can you provide an lnav debug log (pass Can I ask what are you using the |
Hey Tim, thank you for this reply... I'll be happy to share that info but let me ask, when I press ctrl-R to reset lnav, does that also reset the time offset? Because I use ctrl-R all the time. ;-) So maybe that's the issue with it not persisting. I'm using it only because my server is in GMT (and I don't want to change that), but I don't live in GMT and I would like to see the logged events in my own time zone, that's all. |
Yeah, CTRL-R does clear the time offset (ref: Line 1421 in 4250fe9
A log format can be set to convert timestamps to local time when it's known that the timestamps are always UTC. But, that doesn't really work for cases like this... seems like something that should be added to lnav. |
Ah ok. I could adjust my log format (I see you have excellent docs for that)... but yeah, I look at a few different log formats so I'd have to change several formatters and override your defaults that already work perfectly. So yeah, maybe a global time-offset option, unaffected by ctrl-R, is the right answer. I hope I am not creating work for you! hehe |
Hey, I guess this is kind of an old issue, but I found it looking for kind of the opposite thing — is there some way I can reset the time offset without ctrl-R ? I sometimes just want to undo my timestamp changes and I don't remember exactly what the original times were, but I'd like to keep my bookmarks, filters etc. FWIW, in my experience the time offset does survive restarts of a session, and I haven't been able to reset it in one case even with ctrl-R due to Anyway, I guess I wanted to see if there's some way to reset just the time offset, and if not I can file a new issue to request it (or to document it, if there is already a way to do it). |
I know I can set the time_offset every time I run lnav, but that's a hassle.
I tried updating the setting in the SQL
lnav_file
but that also doesn't appear to persist across sessions.I checked the docs but couldn't find any more clues. What's the secret? ;-) Can I have lnav permanently remember this setting? Or at least pass it on the command line?
The text was updated successfully, but these errors were encountered: