From a942b021bcdc52b3eabe751dd4779485c3e69c2f Mon Sep 17 00:00:00 2001 From: Kacnep89 <76146578+Kacnep89@users.noreply.github.com> Date: Tue, 28 Mar 2023 20:38:46 +0500 Subject: [PATCH] Fix conversion and time zone issues (#4072) --- telethon/_updates/messagebox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telethon/_updates/messagebox.py b/telethon/_updates/messagebox.py index e5f67f93..2b4e75ff 100644 --- a/telethon/_updates/messagebox.py +++ b/telethon/_updates/messagebox.py @@ -232,7 +232,7 @@ class MessageBox: self.map[ENTRY_SECRET] = State(pts=session_state.qts, deadline=deadline) self.map.update((s.channel_id, State(pts=s.pts, deadline=deadline)) for s in channel_states) - self.date = datetime.datetime.fromtimestamp(session_state.date).replace(tzinfo=datetime.timezone.utc) + self.date = datetime.datetime.fromtimestamp(session_state.date, tz=datetime.timezone.utc) self.seq = session_state.seq self.next_deadline = ENTRY_ACCOUNT