After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 734854 - One day time divergence of day listed in sidebar and log content
One day time divergence of day listed in sidebar and log content
Status: RESOLVED WONTFIX
Product: gnome-system-log
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-system-log-maint
gnome-system-log-maint
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2014-08-15 11:53 UTC by sam_
Modified: 2020-09-26 09:40 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
Fix the one day shift when selecting a day (507 bytes, patch)
2016-03-23 18:32 UTC, sipertruk
none Details | Review

Description sam_ 2014-08-15 11:53:25 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.
Comment 1 sipertruk 2016-03-23 18:31:28 UTC
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.
Comment 2 sipertruk 2016-03-23 18:32:45 UTC
Created attachment 324610 [details] [review]
Fix the one day shift when selecting a day
Comment 3 André Klapper 2020-09-26 09:40:44 UTC
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.