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:
Lonami Exo
2018-01-05 18:31:48 +01:00
parent c4e26c95f5
commit ec4ca5dbfc
4 changed files with 22 additions and 25 deletions

View File

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