From 3a4d8ec8ddab3cc7df3eb4433210175c2e196173 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Sat, 11 Oct 2014 22:32:08 +0200 Subject: [PATCH] datetime.fromtimestamp() already converts utc timestamp to local date --- modules/playme/module.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/playme/module.py b/modules/playme/module.py index c8087382..a3debafd 100644 --- a/modules/playme/module.py +++ b/modules/playme/module.py @@ -24,7 +24,6 @@ from weboob.capabilities.messages import CapMessages, CapMessagesPost, Thread, M from weboob.capabilities.dating import CapDating from weboob.tools.backend import Module, BackendConfig from weboob.tools.value import Value, ValueBackendPassword -from weboob.tools.date import utc2local from .browser import PlayMeBrowser, FacebookBrowser @@ -62,7 +61,7 @@ class PlayMeModule(Module, CapMessages, CapMessagesPost, CapDating): t = Thread(thread['id']) t.flags = Thread.IS_DISCUSSION t.title = u'Discussion with %s' % thread['name'] - t.date = utc2local(datetime.datetime.fromtimestamp(thread['last_message']['utc_timestamp'])) + t.date = datetime.datetime.fromtimestamp(thread['last_message']['utc_timestamp']) yield t def get_thread(self, thread): @@ -102,7 +101,7 @@ class PlayMeModule(Module, CapMessages, CapMessagesPost, CapDating): title=thread.title, sender=unicode(self.browser.my_name if msg['from'] == self.browser.my_id else user['name']), receivers=[unicode(self.browser.my_name if msg['from'] != self.browser.my_id else user['name'])], - date=utc2local(datetime.datetime.fromtimestamp(msg['utc_timestamp'])), + date=datetime.datetime.fromtimestamp(msg['utc_timestamp']), content=content, children=[], parent=None,