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 339587 - RSSFeed tiles show incorrect date
RSSFeed tiles show incorrect date
Status: RESOLVED FIXED
Product: beagle
Classification: Other
Component: General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Debajyoti Bera
Beagle Bugs
Depends on:
Blocks:
 
 
Reported: 2006-04-24 15:46 UTC by Kevin Kubasik
Modified: 2006-04-25 15:36 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
Fix For DateTime Parsing in LifereaQueryable.cs (817 bytes, patch)
2006-04-24 15:47 UTC, Kevin Kubasik
rejected Details | Review

Description Kevin Kubasik 2006-04-24 15:46:50 UTC
I'm not really sure why it was originally done that way. But I noticed that almost all my feeds were from 'Today'. A quick re-index and this fixes it.
Comment 1 Kevin Kubasik 2006-04-24 15:47:35 UTC
Created attachment 64214 [details] [review]
Fix For DateTime Parsing in LifereaQueryable.cs
Comment 2 Debajyoti Bera 2006-04-24 22:56:31 UTC
The timestamp in lifereaqueryable is stored as unix time_t which is the number of seconds past since 1970/1/1. The way LFQ converts it to a datetime is the only way of converting a unix time to a .Net DateTime structure.

The reason why the correct date/time isnt displayed in beagle-search is probably because of a bug in search/Tiles/RSSFeed.cs. Instead of using
  Utils.NiceShortDate (Timestamp)
I think, the output of "dc:date" should be used. Timestamp reflects the time when it was indexed, not the time when it was published.
Comment 3 Lukas Lipka 2006-04-25 13:15:06 UTC
Bera not really, Timestamp should be the last modification, not the index time.

lukas@viola:~/cvs/beagle/beagled$ grep Timestamp -r *
BlamQueryable/BlamQueryable.cs: indexable.Timestamp = pub_date.ToUniversalTime ();
BuildIndex.cs: indexable.Timestamp = file.LastWriteTimeUtc;
EvolutionDataServerQueryable/BookContainer.cs: indexable.Timestamp = rev;
EvolutionDataServerQueryable/CalContainer.cs: indexable.Timestamp = cc.Dtstart;
EvolutionMailDriver/EvolutionMailIndexableGenerator.cs: indexable.Timestamp = message.Date.ToUniversalTime ();
EvolutionMailDriver/EvolutionMailIndexableGenerator.cs: indexable.Timestamp = messageInfo.SentDate;
FileSystemQueryable/FileSystemQueryable.cs: indexable.Timestamp = Directory.GetLastWriteTimeUtc (path);
FileSystemQueryable/FileSystemQueryable.cs: indexable.Timestamp = File.GetLastWriteTimeUtc (path);
GaimLogQueryable/GaimLogQueryable.cs: indexable.Timestamp = File.GetLastWriteTimeUtc (filename);
KMailQueryable/KMailIndexer.cs: indexable.Timestamp = message.Date.ToUniversalTime ();
KopeteQueryable/KopeteQueryable.cs: indexable.Timestamp = File.GetLastWriteTimeUtc (filename);
LauncherQueryable/LauncherQueryable.cs: indexable.Timestamp = file.LastWriteTime;
LifereaQueryable/LifereaQueryable.cs: date = date.AddSeconds (current_item.Timestamp);
TomboyQueryable/TomboyQueryable.cs: indexable.Timestamp = note.timestamp;

These seem to be "broken":
IndexingServiceQueryable/IndexingServiceQueryable.cs: indexable.Timestamp = data_file.LastWriteTimeUtc;
IndexWebContent.cs: indexable.Timestamp = DateTime.Now;
Comment 4 Debajyoti Bera 2006-04-25 13:33:36 UTC
Hmm.. you are right.
Also you are wrong :-). The liferea backend is also broken.

- date = date.AddSeconds (current_item.Timestamp);
+ indexable.Timestamp = date.AddSeconds (current_item.Timestamp);

I will fix them soon.
Comment 5 Lukas Lipka 2006-04-25 13:40:21 UTC
DateTime date = new DateTime (1970, 1, 1);
date = date.AddSeconds (current_item.Timestamp);
indexable.Timestamp = date;	

That is the current code and is the same thing you posted above. Or am I missing something?
Comment 6 Debajyoti Bera 2006-04-25 13:56:00 UTC
Yikes ... I didnt scroll up in viewcvs. But something is amiss. Yesterday, when I indexed the liferea feeds on my computer, beagle-query returned different values for timestamp and dc:date, which made me all confused.
Comment 7 Lukas Lipka 2006-04-25 14:50:25 UTC
I don't use Liferea so I can't tell. My guess would be maybe some UTC stuff or something.
Comment 8 Debajyoti Bera 2006-04-25 15:36:37 UTC
There was a problem in FilterFactory. FilterFactory was resetting Timestamp to file.lastmodifiedtime irrespective of whether indexable.Timestamp has been set or not.
I am not sure whether it was deliberate or a bug. Anyway, I checked in a fix in CVS, hoping nothing else breaks.