mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-11 05:33:57 +00:00
Fix #1423 (OverflowError thrown during sync on some Linux Systems if one of the timestamps is outside range 1970 to 2038)
This commit is contained in:
parent
76f914cbc2
commit
12263ff02f
@ -48,7 +48,7 @@ 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, OSError):
|
||||
except (KeyError, OSError, OverflowError):
|
||||
# OSError is thrown on Windows if timestamp is <1970 or >2038
|
||||
return datetime.min
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user