Bug 166495

Summary: Incorrect Date shown on Akregator articles - Year 2106
Product: [Applications] akregator Reporter: Marshalleq <atoms>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dariopnc, osterfeld, zahl
Priority: NOR    
Version: SVN   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marshalleq 2008-07-14 08:04:33 UTC
Version:           1.2.50 (using KDE 4.0.83)
OS:                Linux

No idea how this happened, however quite a few are like this, making the sorting all screwed up.  I've tried making akregator delete things over 1 day old to get rid of them but of course they haven't even arrived yet officially with that date so it doesn't delete them.  Please advise what logs to post etc.
Comment 1 Michal Hlavinka 2008-07-14 13:07:43 UTC
this error occurs if time zone in pubDate is missing
13 Jul 2008 10:00 +0000 = correct
13 Jul 2008 10:00 = error
Comment 2 Michal Hlavinka 2008-07-15 13:55:18 UTC
in article.cpp : Article::Article::Private :

const time_t datePublished = article->datePublished();

article->datePublished() for RFC incorret date returns -1 (==2^32-1),
but from parseRFCDate:
time_t parseRFCDate(const QString& str)
{
    time_t res = KDateTime::fromString(str, KDateTime::RFCDate).toTime_t();
    return res != -1 ? res : 0;
}

it should not return -1 value
Comment 3 Michal Hlavinka 2008-07-15 22:24:19 UTC
I've searched around this bug and (for now) found this :

parseRFCDate checks result for time_t(-1)=64bit (at least on my computer), but KDateTime... returned uint32_t(-1), so result is:
return res != 4294967295 ? res : 0;

Conclusion:
it's not akregator's bug, it's kdepim's bug
Comment 4 A. Spehr 2008-07-15 22:37:01 UTC
*** Bug 156370 has been marked as a duplicate of this bug. ***
Comment 5 A. Spehr 2008-07-15 22:43:50 UTC
Seems related to bug #150648. Is the above the beginnings of a patch? :)

If you submit one to the mailing list, I'm sure they'd love it. Thanks!
Comment 6 Michal Hlavinka 2008-07-16 13:12:01 UTC
I've already filled kdepimlib's bug with patch - 166721
Comment 7 A. Spehr 2008-07-18 04:25:46 UTC
So courtesy of bug #166721, this can be closed? Thanks!

And bug #150648?
Comment 8 Frank Osterfeld 2008-10-15 21:41:23 UTC

*** This bug has been marked as a duplicate of bug 166721 ***