Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207220 - app-portage/elogviewer doesn't sort the entries by year
Summary: app-portage/elogviewer doesn't sort the entries by year
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Christian Faulhammer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-23 21:08 UTC by ekz
Modified: 2008-01-24 08:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Bad-Sorted entries (elogviewer-badsort.jpg,109.38 KB, image/jpeg)
2008-01-23 21:09 UTC, ekz
Details
Separation of localized tstamp display from the sort key (elogviewer_tstamp.diff,2.05 KB, patch)
2008-01-23 22:10 UTC, Jouni Kosonen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ekz 2008-01-23 21:08:07 UTC
elogviewer entries are sorted in a day rather than a year, because of the syntax of date (dd/mm/yyyy) (see attached image)

elogviewer version: 0.5.2

Reproducible: Always

Steps to Reproduce:
1. run elogviewer
2. click on 'Time' column, to sort by date


Actual Results:  
The dates are sorted per day

Example (dd/mm/yy):

06/12/07
07/01/08
07/08/07


Expected Results:  
The dates are sorted per year and month

Example (dd/mm/yy):

07/08/07
06/12/07
07/01/08
Comment 1 ekz 2008-01-23 21:09:47 UTC
Created attachment 141677 [details]
Bad-Sorted entries
Comment 2 Christian Faulhammer (RETIRED) gentoo-dev 2008-01-23 21:38:38 UTC
adding author...Mathias, please have a look.
Comment 3 Jouni Kosonen 2008-01-23 22:10:19 UTC
Created attachment 141684 [details, diff]
Separation of localized tstamp display from the sort key

I think that the solution is something like this: show the LC_TIME formatted timestamp but sort by the YYYY-MM-DD hh:mm:ss formatted version.

I may have made a slight mistake somewhere in there, but with this modification the sorting works with fi_FI, ja_JP, en_US and POSIX locales as expected.
Comment 4 ekz 2008-01-23 23:00:07 UTC
(In reply to comment #3)
> Created an attachment (id=141684) [edit]

The patch works OK, thanks

Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2008-01-24 08:20:21 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Created an attachment (id=141684) [edit]
> 
> The patch works OK, thanks

 From me, too. :)  My Python skills are somewhat crippled, so if you are bored, Jouni, you can have a look at bug 195429, which bothers me a bit.  Committed as -r1.  Thanks everyone.