diff options
author | mathieui <mathieui@mathieui.net> | 2020-05-22 17:13:11 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2020-05-23 16:13:44 +0200 |
commit | 4210f5c776dab2439cecb1e19dc3997109cab400 (patch) | |
tree | 847060410690cf0da16fe6c6bd95aec0ab49e07d /poezio/tabs/muctab.py | |
parent | 29eef159d50c836fbd7a27770775d63700dc7f19 (diff) | |
download | poezio-4210f5c776dab2439cecb1e19dc3997109cab400.tar.gz poezio-4210f5c776dab2439cecb1e19dc3997109cab400.tar.bz2 poezio-4210f5c776dab2439cecb1e19dc3997109cab400.tar.xz poezio-4210f5c776dab2439cecb1e19dc3997109cab400.zip |
Convert all datetimes to UTC when doing comparisons
Diffstat (limited to 'poezio/tabs/muctab.py')
-rw-r--r-- | poezio/tabs/muctab.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py index 0cb3d859..5939db31 100644 --- a/poezio/tabs/muctab.py +++ b/poezio/tabs/muctab.py @@ -31,7 +31,7 @@ from poezio import multiuserchat as muc from poezio import timed_events from poezio import windows from poezio import xhtml -from poezio.common import safeJID +from poezio.common import safeJID, to_utc from poezio.config import config from poezio.core.structs import Command from poezio.decorators import refresh_wrapper, command_args_parser @@ -158,7 +158,7 @@ class MucTab(ChatTab): """ status = self.core.get_status() if self.last_connection: - delta = datetime.now() - self.last_connection + delta = to_utc(datetime.now()) - to_utc(self.last_connection) seconds = delta.seconds + delta.days * 24 * 3600 else: seconds = self._text_buffer.find_last_message() |