Chris Jennings wrote: |
Chris Jennings wrote: |
I have an attribute formatted as a date (but not labeled as date) and is sorted as second priority. The sort works fine until I enter a date older than Jan 1st 2002. When I do this it is sorted as the latest. Is this a bug or simply not designed to use dates this old?
Thanks in advance,
Chris
|
Sorry, my mistake. The cutoff date is anything before September 9th 2001 does not sort.
|
I think I remember that this has been discussed earlier: it is a little bug in elogd.
You can see where it comes from if you type in the little command 'date -d "9-Sep-2001 3:46:40" +%s'
Converted to "seconds of the epoche" (seconds since 1970-01-01 00:00:00 UTC) the date "9-Sep-2001 3:46:40" has one digit more than "9-Sep-2001 3:46:39".
Since elog makes a string comparison, suddenly 1'000'000'000 is less than 999'999'999; therefore the wrong sorting.
Workaround: you can modify your old entries and add a leading zero to all entries where your specific date field starts with a '9'.
Stefan: you should fix it at least well before 20-Nov-2286 18:46:40, when the same bug strikes again!
|