binary_reader: Parse TL 'date' to UTC datetime instead of local

This commit is contained in:
Dmitry D. Chernov
2017-11-23 02:06:43 +10:00
parent 7d4453351b
commit f99d14558f
2 changed files with 3 additions and 3 deletions

View File

@@ -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"""