Commit 12263ff0 authored by Ozzieisaacs's avatar Ozzieisaacs

Fix #1423 (OverflowError thrown during sync on some Linux Systems if one of...

Fix #1423 (OverflowError thrown during sync on some Linux Systems if one of the timestamps is outside range 1970 to 2038)
parent 76f914cb
...@@ -48,7 +48,7 @@ def to_epoch_timestamp(datetime_object): ...@@ -48,7 +48,7 @@ def to_epoch_timestamp(datetime_object):
def get_datetime_from_json(json_object, field_name): def get_datetime_from_json(json_object, field_name):
try: try:
return datetime.utcfromtimestamp(json_object[field_name]) return datetime.utcfromtimestamp(json_object[field_name])
except (KeyError, OSError): except (KeyError, OSError, OverflowError):
# OSError is thrown on Windows if timestamp is <1970 or >2038 # OSError is thrown on Windows if timestamp is <1970 or >2038
return datetime.min return datetime.min
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment