Commit 241f026c authored by Madhur Garg's avatar Madhur Garg

Fixed timestamp

parent 0c22a856
......@@ -19,9 +19,10 @@ def add_line(text_buffer: TextBuffer, text: str, str_time: str, nick: str, top:
if '/' in nick:
nick = nick.split('/')[1]
color = get_theme().COLOR_OWN_NICK
time = time.replace(tzinfo=timezone.utc).astimezone(tz=None)
time = time.replace(tzinfo=None)
else:
color = get_theme().COLOR_ME_MESSAGE
top = top
text_buffer.add_message(
text,
time,
......@@ -88,6 +89,9 @@ def mam_scroll(self):
if time < end:
end = time
end = end + timedelta(seconds=-1)
tzone = datetime.now().astimezone().tzinfo
end = end.replace(tzinfo=tzone).astimezone(tz=timezone.utc)
end = end.replace(tzinfo=None)
end = datetime.strftime(end, '%Y-%m-%dT%H:%M:%SZ')
start = datetime.strptime(end, '%Y-%m-%dT%H:%M:%SZ')
start = start + timedelta(days=-360)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment