How do I revert to original date and time of a photo in Photos app

Leonie has a great script that allows me to select a group of photos and change the date & time of each such that they become chronological to the 1st selected image in increments of 1 second.


It has been and will continue to be very useful for me.


However, is there a script to allow me to revert to the original dates & times of a selection of photos whose dates & times have been changed? Doing the reversion manually is possible, of course, but I need to revert 367.


For what it's worth, it isn't 367 photos ordered in 1 second intervals, but 20 or so different groups of photos ordered in 1 second intervals.


Thank you in advance for any help.

iMac (M1, 2021)

Posted on Jul 14, 2023 8:11 PM

Reply

Similar questions

4 replies

Jul 16, 2023 2:29 AM in response to Paultake276

Paultake276 wrote:

I don't know much AppleScript, but it seems, looking at the Photos Dictionary, there's no way to extract the original date & time once it is replaced by an adjusted date & time.

Is that right?

Apple Script can only show us the current date that we are seeing in Photos and can only modify this date. There is no simple way to use Apple Script to restore the original date, as Apple Script does not allow us to reveal the original in the Finder.

  • We would have to make Apple Script export the original File
  • Then use exiftool to look up the embedded EXIF date tag of the exported original,
  • Delete the original file in the Finder
  • Then tell Photos to set the capture date of the photo to the date of the original.


As long as you have not exported and reimport edited versions, the original datesset by the camera or scanner should have been preserved in the original image file. Only exporting and reimporting the edited version will cause you to lose the original date and burn the modified date in. If you still have the original in your library and only have used my script to modify the date or the "Image > Adjust Date & Time" dialog, you can revert to the original date using the "Image > Adjust Date & Time" dialog.



This dialog will show you the original date. You just cannot batch revert to the original date, but have to do it for each photo. It is the only chance to save your other edits. But you could find your edited photos easily by setting the "Showing" Filter to "Edited" when viewing the photos where you want to revert to the original date while saving your adjustments and locations.


Jul 15, 2023 7:20 PM in response to Richard.Taylor

Thank you, Richard. Most of my images are edited, but it's good tip to know if I really need the original date to show & can part with the edits.


I don't know much AppleScript, but it seems, looking at the Photos Dictionary, there's no way to extract the original date & time once it is replaced by an adjusted date & time.


Is that right?


Seems like the original date & time is like a default value that can be changed. Is there a way a script could simply restore the default without having to specify or "know" the original date & time?


Jul 16, 2023 4:02 PM in response to léonie

Thank you, Leonie, for the explanation. I will try not to be overzealous using your script so I'm not in the pos of restoring the original dates & times of a lot of edited photos by hand!


Could one amend your script so that when it goes to change the date of a photo, it adds the original date into the caption before changing it? If the photo's date has been previously altered by the script & thus the caption already has a date, then the script could query the user for instruction or simply skip over to the next photo. (Of course, if the photo already has a caption, then the script asks user to add date to caption or simply change the date & skip changing the caption.)


Then when one wanted the original date restored for selection of photos, a script could search a photo's caption for a date. If there's no date in the caption or it is the same as the photo's date, then the script again can query the user or skip over that photo.


Of course, for photos whose dates I have already changed, things would get muddled because the script would assume that date was the original since the caption would be empty. Still, I think such an amended script would be useful since I still have the option to check for the original date manually.


Even if a script can't see the original date, can it determine if it has been altered?




This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How do I revert to original date and time of a photo in Photos app

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.