Merge pull request #146 from agprimatic/patch-1

Catch illegal timestamp value
This commit is contained in:
Rhet Turnbull
2020-05-23 16:06:23 -07:00
committed by GitHub

View File

@@ -805,7 +805,11 @@ class PhotosDB:
else:
self._dbphotos[uuid]["lastmodifieddate"] = None
self._dbphotos[uuid]["imageDate"] = datetime.fromtimestamp(row[5] + td)
try:
self._dbphotos[uuid]["imageDate"] = datetime.fromtimestamp(row[5] + td)
except ValueError:
self._dbphotos[uuid]["imageDate"] = datetime.date(1970,1,1)
self._dbphotos[uuid]["mainRating"] = row[6]
self._dbphotos[uuid]["hasAdjustments"] = row[7]
self._dbphotos[uuid]["hasKeywords"] = row[8]