mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-01-24 08:14:14 +03:00
tlobject: Represent timestamp as 'int' instead of 'float'
This commit is contained in:
parent
f99d14558f
commit
5a4d6d4a57
|
@ -36,7 +36,9 @@ class TLObject:
|
|||
', '.join(TLObject.pretty_format(x) for x in obj)
|
||||
)
|
||||
elif isinstance(obj, datetime):
|
||||
return 'datetime.utcfromtimestamp({})'.format(obj.timestamp())
|
||||
return 'datetime.utcfromtimestamp({})'.format(
|
||||
int(obj.timestamp())
|
||||
)
|
||||
else:
|
||||
return repr(obj)
|
||||
else:
|
||||
|
@ -82,7 +84,7 @@ class TLObject:
|
|||
|
||||
elif isinstance(obj, datetime):
|
||||
result.append('datetime.utcfromtimestamp(')
|
||||
result.append(repr(obj.timestamp()))
|
||||
result.append(repr(int(obj.timestamp())))
|
||||
result.append(')')
|
||||
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue
Block a user