GNOME Bugzilla – Bug 339587
RSSFeed tiles show incorrect date
Last modified: 2006-04-25 15:36:37 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.
Created attachment 64214 [details] [review] Fix For DateTime Parsing in LifereaQueryable.cs
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.
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;
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.
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?
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.
I don't use Liferea so I can't tell. My guess would be maybe some UTC stuff or something.
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.