Skip to content

log_actual_time sometimes gets converted to GMT #1672

@GregAtkinson72

Description

@GregAtkinson72

lnav version
0.14.0
and
0.12.4

Describe the bug
When using the lnav command line to run SQL statements, the log_actual_time is sometimes incorrect by 5 hours (my time zone is GMT -5)

Please note: I believe this is different than issue #1073 . In the examples below, log_time is off by 1 second, but that doesn't really bother me.. The problem I'm reporting is that log_actual_time is sometimes off by 5 hours.

My environment
Ubuntu 25.10
Timezone set to Central Time (I suspect anything except GMT would work)

To Reproduce

Test #1: log_actual_time is exactly 5 hours later than it should be
File: sample1.log
192.168.2.20 - - [20/Apr/2026:10:04:03 -0500] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
192.168.2.20 - - [20/Apr/2026:10:04:02 -0500] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
192.168.2.20 - - [20/Apr/2026:10:05:00 -0500] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
*Note that the second line is out of order and the third line is in a different minute than the second line.

$ lnav -n -c ";select log_actual_time, log_time from access_log" sample1.log
log_actual_time log_time
2026-04-20 10:04:03.000000 2026-04-20 10:04:03.000000
2026-04-20 15:04:02.000000 2026-04-20 10:04:03.000000
2026-04-20 10:05:00.000000 2026-04-20 10:05:00.000000

Test #2: log_actual_time is correct
File: sample2.log
192.168.2.20 - - [20/Apr/2026:10:04:03 -0500] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
192.168.2.20 - - [20/Apr/2026:10:04:02 -0500] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
192.168.2.20 - - [20/Apr/2026:10:04:59 -0500] "GET /cgi-bin/try/ HTTP/1.0" 200 3395
*Note that the second line is out of order and the third line is in the same minute as the second line.

$ lnav -n -c ";select log_actual_time, log_time from access_log" sample2.log
log_actual_time log_time
2026-04-20 10:04:03.000000 2026-04-20 10:04:03.000000
2026-04-20 10:04:02.000000 2026-04-20 10:04:03.000000
2026-04-20 10:04:59.000000 2026-04-20 10:04:59.000000

I can also reproduce this using the GUI.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions