|
@@ -386,6 +386,7 @@ def parse_date(date: Any) -> Optional[datetime]:
|
|
|
if EARLIEST_POSSIBLE < timestamp < LATEST_POSSIBLE:
|
|
if EARLIEST_POSSIBLE < timestamp < LATEST_POSSIBLE:
|
|
|
# number is seconds
|
|
# number is seconds
|
|
|
return datetime.fromtimestamp(timestamp)
|
|
return datetime.fromtimestamp(timestamp)
|
|
|
|
|
+
|
|
|
elif EARLIEST_POSSIBLE * 1000 < timestamp < LATEST_POSSIBLE * 1000:
|
|
elif EARLIEST_POSSIBLE * 1000 < timestamp < LATEST_POSSIBLE * 1000:
|
|
|
# number is milliseconds
|
|
# number is milliseconds
|
|
|
return datetime.fromtimestamp(timestamp / 1000)
|
|
return datetime.fromtimestamp(timestamp / 1000)
|