From 0f457a4082a4eebc42a5df2160a02ad987b6f96c Mon Sep 17 00:00:00 2001 From: Rhet Turnbull Date: Mon, 24 Aug 2020 06:00:57 -0700 Subject: [PATCH] Added raw timestamps to PhotoInfo._info --- osxphotos/_version.py | 2 +- osxphotos/photosdb/photosdb.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/osxphotos/_version.py b/osxphotos/_version.py index 76bb1280..3b5282c8 100644 --- a/osxphotos/_version.py +++ b/osxphotos/_version.py @@ -1,3 +1,3 @@ """ version info """ -__version__ = "0.33.3" +__version__ = "0.33.4" diff --git a/osxphotos/photosdb/photosdb.py b/osxphotos/photosdb/photosdb.py index 30fb8823..ed178b50 100644 --- a/osxphotos/photosdb/photosdb.py +++ b/osxphotos/photosdb/photosdb.py @@ -932,6 +932,7 @@ class PhotosDB: # There are sometimes negative values for lastmodifieddate in the database # I don't know what these mean but they will raise exception in datetime if # not accounted for + self._dbphotos[uuid]["lastmodifieddate_timestamp"] = row[4] try: self._dbphotos[uuid]["lastmodifieddate"] = datetime.fromtimestamp( row[4] + TIME_DELTA @@ -942,6 +943,7 @@ class PhotosDB: self._dbphotos[uuid]["lastmodifieddate"] = None self._dbphotos[uuid]["imageTimeZoneOffsetSeconds"] = row[9] + self._dbphotos[uuid]["imageDate_timestamp"] = row[5] try: imagedate = datetime.fromtimestamp(row[5] + TIME_DELTA) @@ -1798,6 +1800,7 @@ class PhotosDB: # There are sometimes negative values for lastmodifieddate in the database # I don't know what these mean but they will raise exception in datetime if # not accounted for + info["lastmodifieddate_timestamp"] = row[4] try: info["lastmodifieddate"] = datetime.fromtimestamp(row[4] + TIME_DELTA) except ValueError: @@ -1806,6 +1809,7 @@ class PhotosDB: info["lastmodifieddate"] = None info["imageTimeZoneOffsetSeconds"] = row[6] + info["imageDate_timestamp"] = row[5] try: imagedate = datetime.fromtimestamp(row[5] + TIME_DELTA)