GNOME Bugzilla – Bug 734854
One day time divergence of day listed in sidebar and log content
Last modified: 2020-09-26 09:40:44 UTC
First reported there: https://bugs.launchpad.net/ubuntu/+source/gnome-system-log/+bug/1357337 Open logviewer :$gnome-system-log View syslog or kernlog which are listing more history days in sidebar. e.g. today is 15th of August selecting 'yesterday' below kern.log presents log file from today 15th of August selecting Wednesday 13th of August presents log file from Thursday 14th of August (screenshots attached) Logviewer on a notebook, also upgraded from 12.04 to 14.04, shows same behaviour.
The problem lies in logview-utils.c at line 55 : retval->date = g_date_time_new_from_unix_utc (g_date_time_to_unix (day->date)); because day->date have been created with g_date_time_new_local () a one day shift can happen. We could fix it like that : retval->date = g_date_time_new_from_unix_local (g_date_time_to_unix (day->date)); but instead let it be free of any timezone consideration : retval->date = g_date_time_add_seconds (day->date, 0); this bug was also reported in Bug 623515 with a less accurate fix.
Created attachment 324610 [details] [review] Fix the one day shift when selecting a day
gnome-system-log is not under active development anymore and had its last code changes more than four years ago. Its codebase has been archived at https://gitlab.gnome.org/Archive/gnome-system-log/ Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is being shut down) if anyone takes the responsibility for active development again.