Commit c1f5252b authored by Ozzieisaacs's avatar Ozzieisaacs

Fix #1509 (OSError thrown during sync on Windows if one of the timestamps is...

Fix #1509 (OSError thrown during sync on Windows if one of the timestamps is outside range 1970 to 2038)
parent 20c6f79a
......@@ -45,7 +45,8 @@ def to_epoch_timestamp(datetime_object):
def get_datetime_from_json(json_object, field_name):
try:
return datetime.utcfromtimestamp(json_object[field_name])
except KeyError:
except (KeyError, OSError):
# OSError is thrown on Windows if timestamp is <1970 or >2038
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