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 724335 - bug in util-time.vala means all internaldate_time_t values are in the year 3800
bug in util-time.vala means all internaldate_time_t values are in the year 3800
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: engine
master
Other Linux
: Normal normal
: 0.6.0
Assigned To: Charles Lindsay
Geary Maintainers
review
: 724336 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-02-14 02:02 UTC by Charles Lindsay
Modified: 2014-02-15 00:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Charles Lindsay 2014-02-14 02:02:21 UTC
In util-time.vala, line 24, there's some code to set the year of a GLib.Time, where a value of 0 represents the year 1900.  We set it to a minimum of 1900, though, which represents the year 3800.  As a result, any time_t that comes out of the function will be in the year 3800.

This is affecting our search function, where because everything is in the same year, results from December of any year show up as later than results from January of any year (even if that January is actually the following month).  Since we only show the last however many results, I simply can't find some email from this January/February.

We need to fix util-time.vala (changing the minimum of 1900 to a minimum of 0 would probably do the trick), and then do a new database version that blows away all values in the internaldate_time_t column (which is I believe the only one affected here) and repopulates it correctly.
Comment 1 Yosef Or Boczko 2014-02-14 02:09:55 UTC
*** Bug 724336 has been marked as a duplicate of this bug. ***
Comment 2 Charles Lindsay 2014-02-14 23:33:14 UTC
wip/time_t-724335

It's just reusing the existing code to populate the internaldate_time_t column.
Comment 3 Charles Lindsay 2014-02-15 00:07:50 UTC
Fixed in commit 4dc5d28.