monboob wants an utc date...
This commit is contained in:
parent
3a4d8ec8dd
commit
44190f3f29
1 changed files with 3 additions and 2 deletions
|
|
@ -24,6 +24,7 @@ from weboob.capabilities.messages import CapMessages, CapMessagesPost, Thread, M
|
||||||
from weboob.capabilities.dating import CapDating
|
from weboob.capabilities.dating import CapDating
|
||||||
from weboob.tools.backend import Module, BackendConfig
|
from weboob.tools.backend import Module, BackendConfig
|
||||||
from weboob.tools.value import Value, ValueBackendPassword
|
from weboob.tools.value import Value, ValueBackendPassword
|
||||||
|
from weboob.tools.date import local2utc
|
||||||
|
|
||||||
from .browser import PlayMeBrowser, FacebookBrowser
|
from .browser import PlayMeBrowser, FacebookBrowser
|
||||||
|
|
||||||
|
|
@ -61,7 +62,7 @@ class PlayMeModule(Module, CapMessages, CapMessagesPost, CapDating):
|
||||||
t = Thread(thread['id'])
|
t = Thread(thread['id'])
|
||||||
t.flags = Thread.IS_DISCUSSION
|
t.flags = Thread.IS_DISCUSSION
|
||||||
t.title = u'Discussion with %s' % thread['name']
|
t.title = u'Discussion with %s' % thread['name']
|
||||||
t.date = datetime.datetime.fromtimestamp(thread['last_message']['utc_timestamp'])
|
t.date = local2utc(datetime.datetime.fromtimestamp(thread['last_message']['utc_timestamp']))
|
||||||
yield t
|
yield t
|
||||||
|
|
||||||
def get_thread(self, thread):
|
def get_thread(self, thread):
|
||||||
|
|
@ -101,7 +102,7 @@ class PlayMeModule(Module, CapMessages, CapMessagesPost, CapDating):
|
||||||
title=thread.title,
|
title=thread.title,
|
||||||
sender=unicode(self.browser.my_name if msg['from'] == self.browser.my_id else user['name']),
|
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'])],
|
receivers=[unicode(self.browser.my_name if msg['from'] != self.browser.my_id else user['name'])],
|
||||||
date=datetime.datetime.fromtimestamp(msg['utc_timestamp']),
|
date=local2utc(datetime.datetime.fromtimestamp(msg['utc_timestamp'])),
|
||||||
content=content,
|
content=content,
|
||||||
children=[],
|
children=[],
|
||||||
parent=None,
|
parent=None,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue