I’m scripting Photos to update the dates on photos in an album, to make them match the order of photos in the album. These are scans of old photos so the modification dates don’t match when the photos were taken anyway.
It almost works but some photos get a date one hour too early. That looks like a time zone problem except that the photos have no location information, so I can’t tell where it would come from.
tell application "Photos" set currentAlbum to album named "Album name" -- Start with a date slightly in the past, based on the album size. set currentAlbumCount to (count of media items in currentAlbum) set photoDate to (current date) - currentAlbumCount repeat with currentItem in media items in currentAlbum set photoDate to photoDate + 1 set date of currentItem to photoDate end repeat end tell
After running this, the EXIF for photos has the time/date for some being an hour earlier than others-- e.g. one at 4:16:13 pm, the next one at 3:16:14, then 4:16:15, with no apparent reason why some are off by an hour.
I’m trying to do this because when I export and use the photos in other places (like Google photos) they get sorted by date, and I want to preserve the sort order.