Bug 194302

Summary: KDEµBlog is wrong about when a micropost was published
Product: [Unmaintained] plasma4 Reporter: Js Lebacq <js.lebacq>
Component: widget-microbloggingAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: andresbajotierra, annma, aseigo, dan, jbrouault, karl, michael
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Unspecified   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch to set TimeSpec to UTC
Consider timestamps as UTC when displaying

Description Js Lebacq 2009-05-27 13:58:19 UTC
Version:            (using KDE 4.2.85)
Installed from:    Ubuntu Packages

KDEµBlog is wrong about when a micropost was published. For example, when a micropost was published 2 hours ago, it says 3 or 4 hours!
Comment 1 Anne-Marie Mahfouf 2009-05-27 17:13:03 UTC
Is it with Twitter? Identi.ca? both?
Does it happen only with new posts? 
Did you just open your account?

Please add as much information as possible, thanks in advance.
Comment 2 Js Lebacq 2009-05-27 17:40:15 UTC
> "Is it with Twitter? Identi.ca? both?"
I only use identi.ca

> "Does it happen only with new posts?"
The problem begin at the start of the app and for all the status displayed in the plasmoid.

> "Did you just open your account?"
No, I'm an older user of identi.ca than KDEµBlog.

Also, for the moment it is always 1 or 2 hour more than the reality, like in my first example.
Comment 3 Anne-Marie Mahfouf 2009-05-27 18:47:19 UTC
Is there a pattern for the +1 or +2 hours? Is it correct on Identi.ca website?
Did you only start using the applet now? Or did it work correctly some time back?
Comment 4 Js Lebacq 2009-05-27 19:04:00 UTC
> "Is there a pattern for the +1 or +2 hours?"
Sorry, it seems I'm unable to find it.

> "Is it correct on Identi.ca website?"
Well, yes, as far as I can see.

> "Did you only start using the applet now? Or did it work correctly some time
back?"
I began to use it one day ago.
Comment 5 Aaron J. Seigo 2009-05-27 20:18:05 UTC
let me guess, your timezone is UTC+1 or UTC+2? :)
Comment 6 Aaron J. Seigo 2009-05-27 20:27:15 UTC
SVN commit 973716 by aseigo:

created_at (aka "Date" from the engine) is always in UTC, so don't use the current system time but the current UTC time to establish how long ago the tweet was made
BUG:194302


 M  +21 -21    microblog.cpp  
 M  +4 -0      microblog.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=973716
Comment 7 Jean-Baptiste Rouault 2009-08-13 01:16:04 UTC
Created attachment 36115 [details]
Patch to set TimeSpec to UTC

My timezone is UTC+2 and the microblogging widget always has a 2 hours shift.
Seems to be because the TimeSpec of the QDateTime created by toDateTime() is local instead of being UTC.
The attached patch set the TimeSpec to UTC.
Comment 8 Dario Andres 2009-08-19 04:32:47 UTC
This is still present on KDE4.3: bug 203949; so I guess it was not fixed properly or reappeared on 4.3.0
Comment 9 Jean-Baptiste Rouault 2009-08-20 12:34:06 UTC
SVN commit 1013632 by jbrouault:

Force the tweet date to UTC time spec to establish how long ago the tweet was posted.
BUG:194302
BUG:203949



 M  +3 -1      microblog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1013632
Comment 10 Jean-Baptiste Rouault 2009-09-12 13:44:44 UTC
SVN commit 1022729 by jbrouault:

backport of r1013632
BUG:194302
BUG:203949


 M  +3 -1      microblog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1022729
Comment 11 Dario Andres 2009-09-12 15:42:17 UTC
*** Bug 203949 has been marked as a duplicate of this bug. ***
Comment 12 Michael Homer 2010-02-10 09:33:18 UTC
Created attachment 40635 [details]
Consider timestamps as UTC when displaying

This is against the 4.4.0 tarball of KDE-Plasma-Addons, and based on the change in the patch applied to the 4.3 series.
Comment 13 Michael Homer 2010-02-10 09:40:01 UTC
The issue has reappeared in 4.4.0 and the previous patch no longer applies as the display has been split out to another file. The attached patch makes the same basic change as Jean-Baptiste's, but now in postwidget.cpp for the widget. It has solved the problem locally.
Comment 14 Dan 2010-02-26 23:24:24 UTC
I confirm that the issue is back on KDE 4.4, I just posted a new bug report, but will remove it if I see action.

It's been a long time since I have applied a patch, can you point me to a "how-to" so I can fix and affirm?

Thanks!
Dan
Comment 15 Anne-Marie Mahfouf 2010-02-27 13:19:40 UTC
*** Bug 228676 has been marked as a duplicate of this bug. ***
Comment 16 Anne-Marie Mahfouf 2010-02-27 13:59:14 UTC
SVN commit 1096698 by annma:

Thanks Michael for the patch, too bad I did not see this before 4.4.1 tagging, will only be in 4.4.2.
Will fixe also in trunk
BUG=194302


 M  +1 -0      postwidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1096698
Comment 17 Anne-Marie Mahfouf 2010-02-27 14:34:59 UTC
SVN commit 1096721 by annma:

port 1096698 to trunk (fixe timeline)
CCBUG=194302


 M  +1 -0      postwidget.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1096721