Replies: 3 comments 11 replies
-
I’m surprised they still sort wrong after you updated the time zone. I’ll take a look this weekend and see if I can figure out why that is. In short, yes you could do this. I’ve steered clear of modifying the database in osxphotos but have started to venture into the wilds with a merge photo libraries feature I’m working on. If I get that working without breaking anything, it would be possible to eventually add a feature to do fix timezones. It would be really handy to able to directly modify the database to “fix” things. If just the timezone is wrong, you’ll need to modify osxphotos/osxphotos/photosdb/photosdb.py Lines 1833 to 1841 in 15a3e69 And for the join: osxphotos/osxphotos/photosdb/photosdb.py Line 1875 in 15a3e69 And: osxphotos/osxphotos/photosdb/photosdb.py Lines 1931 to 1941 in 15a3e69 If you try to run UPDATE on the tables in sqlite, you’ll get lots of trigger errors as it’s really a Core Data database masquerading as sqlite. See here: #356 (comment) For TIME_DELTA, you’ve got to convert between unix time and MacOS time epochs: osxphotos/osxphotos/_constants.py Line 12 in 15a3e69 |
Beta Was this translation helpful? Give feedback.
-
Hi @neilpa curious if you were able to get this issue fixed? |
Beta Was this translation helpful? Give feedback.
-
@neilpa @Jmuccigr New script
This example sets the date for all selected photos to 2021-09-10, subtracts 1 hour from the time of each photo, and sets the timezone of each photo to GMT -07:00 (Pacific Daylight Time). I'll eventually add a |
Beta Was this translation helpful? Give feedback.
-
I've got lots of photos in my library with incorrect timestamps from not updating the timezone on my digital camera on trips. I've updated the TZ for most of them in Photos but unfortunately they sort as-if they still had the original time. This is annoying when mixed with iPhone, etc. pics with proper local time. Also, I would prefer for the "originals" in the photo library to have the right timestamp regardless.
So, is it possible to edit the file metadata in-place in the photos library directly without any ill effects? Anything I may also need to tweak in the photos sqlite DB to keep things properly in sync?
I considered doing
osxphotos export --exiftool ...
for the impacted photos and re-import them but decided against that since many of them have associated edits. I'm open to alternatives though.Beta Was this translation helpful? Give feedback.
All reactions