mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-05 03:22:29 +00:00
More consistent with asyncio branch (style/small fixes)
Like passing an extra (invalid) dt parameter when serializing a datetime, and handling more errors in the TcpClient class.
This commit is contained in:
@@ -134,7 +134,7 @@ class TLObject:
|
||||
if isinstance(dt, datetime):
|
||||
dt = int(dt.timestamp())
|
||||
elif isinstance(dt, date):
|
||||
dt = int(datetime(dt.year, dt.month, dt.day, dt).timestamp())
|
||||
dt = int(datetime(dt.year, dt.month, dt.day).timestamp())
|
||||
elif isinstance(dt, float):
|
||||
dt = int(dt)
|
||||
|
||||
|
Reference in New Issue
Block a user