mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-08 04:52:30 +00:00
binary_reader: Parse TL 'date' to UTC datetime instead of local
This commit is contained in:
@@ -113,7 +113,7 @@ class BinaryReader:
|
||||
into a Python datetime object
|
||||
"""
|
||||
value = self.read_int()
|
||||
return None if value == 0 else datetime.fromtimestamp(value)
|
||||
return None if value == 0 else datetime.utcfromtimestamp(value)
|
||||
|
||||
def tgread_object(self):
|
||||
"""Reads a Telegram object"""
|
||||
|
Reference in New Issue
Block a user