diff --git a/osxphotos/__init__.py b/osxphotos/__init__.py index b459a63f..ee5be322 100644 --- a/osxphotos/__init__.py +++ b/osxphotos/__init__.py @@ -980,7 +980,8 @@ class PhotoInfo: def date(self): """ image creation date as timezone aware datetime object """ imagedate = self.__info["imageDate"] - delta = timedelta(seconds=self.__info["imageTimeZoneOffsetSeconds"]) + seconds = self.__info["imageTimeZoneOffsetSeconds"] or 0 + delta = timedelta(seconds=seconds) tz = timezone(delta) imagedate_utc = imagedate.astimezone(tz=tz) return imagedate_utc