14

I have some photos taken in 2012 and when I export them as originals to a folder they have a creation date of July 2016. Running an EXIF detailer showed the images to have been taken in 2012, so why does Photos export them and add another date to it?

I tried exporting my whole album from 2009-2016 and noticed some pictures taken in years prior to 2016 to appear in July or other months of this year as well.

I would really appreciate if someone can shed some light on this issue.

3
  • Granted I am not using Sierra, but I just tested exporting a photo from 2012 (using Export Unmodified Originals). Finder shows the file as having a created date in 2012, and File Viewer shows the EXIF date is intact as well. See this question on the Photography SE for ways to change file creation dates to the embedded EXIF date.
    – tubedogg
    Commented Oct 11, 2016 at 20:32
  • That said, I wouldn't rely on the file creation date to mean anything. It can be changed for various reasons (copying files will result in a creation date of the date of the copy, for example).
    – tubedogg
    Commented Oct 11, 2016 at 20:35
  • @tubedogg It works perfectly, but not for videos, have you heard of a tool that does the same for videos by any chance?
    – Render
    Commented Oct 13, 2016 at 17:09

7 Answers 7

10

Note that, in order for your files to have a created date that matches the EXIF "photo taken" date, you must use Export Unmodified Originals. Modified images may have been edited within Photos which results in a new file being created, and using the normal Export will export that modified file with the later creation date.

There are some options in this post on Photography SE for changing a file's creation date to match EXIF data. You should never attempt to use these on files within the .photoslibrary bundle! Export your files first.

ExifTool is a very powerful command-line application for reading and writing EXIF data in a variety of files, including videos. However, on Macs, it cannot write the file creation date. There's a way around that using a bit of bash scripting.

Here's a command that will work for both photo and video files:

for file in *; do SetFile -d "$(exiftool -p '$CreateDate' -d '%m/%d/%Y %H:%M:%S' "$file")" "$file"; done

Essentially a loop is run over files in the current directory. exiftool is used to read the EXIF creation date tag, and SetFile is used to write as the file's creation date. The way it is written, it will affect all files in the current directory, so I suggest you move all files that you wanted modified into a directory with nothing else in it, and run the command from that directory.

0
3

Like the case of apple icloud photos, when you have all the information in the EXIF details, like you already know.

To restore all the dates information I followed this steps

  1. Download exiftool

  2. Run next command to fix the dates in all the files inside the folder(recursively)

    exiftool -r '-FileModifyDate<DateTimeOriginal' "hereYourDirName"
    
  3. Run next command to fix the dates in MOV files inside the folder(recursively)

    exiftool -r '-FileModifyDate<CreationDate' "hereYourDirName/*.mov"
    
  4. If you have the No writable tags... error, this probably means that you don't have the permission, so you can fix the owner and the permission with these command

    sudo chown -R yourSessionUser directoryName
    sudo chmod -R 775 directoryName
    

This will restore all the dates. I hope that this information be useful



Now some other helping commands

To can check if your file has all the EXIF information you can check it with this command. Useful to be sure that you have the DateTimeOriginal with the right date.

exiftool -a -s -G directoryName

If you want to update the EXIF just on some extensions, for example just photos, you can use this commands. Useful if you have a los of mov files or files without the EXIF information, like this you will skip them, you will not have a warning and the exiftool will finish faster.

  1. Generate the file called filesToUpdate.txt with the list of files that you want to update.

    find hereTheAbsolutePathToTheFolder/* -type f | grep -E
    '\.(jpg|jpeg|png|heic|JPG|JPEG|PNG|HEIC)$' > filesToUpdate.txt
    

The list of jpg|jpeg|png|heic|JPG|JPEG|PNG|HEIC, is the list of extensions that you want to consider.

  1. Now the command to run all this files is like this:

    exiftool '-FileModifyDate<DateTimeOriginal' -@ filesToUpdate.txt
    

This command is to check which extensions files you have in a folder. Useful to check which extensions you want to include in previous command.

find hereThePathToTheFolderThat/* -type f | 
perl -ne 'print $1 if m/\.([^.\/]+)$/' | sort -u
2

in case you would like to use touch instead of SetFile:

for file in *; do touch -mt "$(exiftool -p '$CreateDate' -d '%Y%m%d%H%M.%S' "$file")" "$file"; done
2

The accepted answer assumes one knows how to use the command line. If you do not, here are the assumed precursor steps:

1) Install a package manager, if you don't have one installed already. (And then use it forever to install new software :))

(Recommended:)

For Mac: use Homebrew - https://brew.sh/

For Windows: use Chocolatey - https://chocolatey.org/

2) Using your (^^ newly installed) package manager, install exiftool, which is free software for viewing/working with media metadata:

On Mac:

brew install exiftool

On Windows:

choco install exiftool

3) Navigate to the directory containing your image/movie files by using the 'change directory' command: cd - (Read more about how to use the command line here: https://www.digitalcitizen.life/command-prompt-how-use-basic-commands)

cd {insert-name-of-your-file-directory-here}

4) The last command is based on the above accepted answer(s), but I found that I needed to switch this to CreationDate for it to actually reflect the original photos'/videos' capture date. And I also opted for using touch:

One-liner version (copy and paste this):

for file in *; do touch -t "$(exiftool -p '$CreationDate' -d '%Y%m%d%H%M' "$file")" "$file"; done

(Same code, but formatted for readability in case you want to understand what is happening):

for file in *; do   \
    touch -t "$(exiftool -p '$CreationDate' -d '%Y%m%d%H%M' "$file")" "$file";   \
done
3
  • 1
    Can you install exiftool without installing the brew package manager? What if someone uses another package manager such as fink?
    – fd0
    Commented Sep 25, 2018 at 10:24
  • Yeah, of course. However you want to install it! Commented Sep 27, 2018 at 11:02
  • For whatever reason, my Photos app exported .jpeg files, in macOS Ventura 13.4, don't have a $CreationDate EXIF tag; but they DO have an equivalent $CreateDate EXIF tag. (Exported .mov files have BOTH tags. In both cases, photos/videos were taken on an iPhone running iOS 16.5.) Replacing $CreationDate with $CreateDate in the one-liner above worked great for me! Commented Jul 23, 2023 at 13:07
1

I have just came across this post while trying to export all item of a Photos library to then re-import them in another one to consolidate all I have in one library. Using the default export unmodified original options, I realized that some items lose the "date taken" and so when re-imported they appears as if they are created today with the result of having all disorganized. I realized that most of those items are movies and stuff acquired from whatsapp. Looks like Photos has some metadata about those items that is not exporting in EXIF metadata. I solved all of this using this fantastic python tool:

It has many parameters to properly configure the export. Most usefull "--exiftool " that store exif information into the exported items.

0

I use an application called A Better Finder Rename, with the preferences shown on the screenshot. The result is like: 2021-06-26 19.01.14.jpeg

It can read the original creation date from the jpeg's EXIF (so no worry, this information is not lost after you export from the Photos app). You can save a preset to a so called Droplet, then all you need to do is just drag and drop the images to the Droplet to make the bulk rename.

It can rename photos in complex folder hierarchy, hundreds or thousands images if you'd like.

If you prefer to use .jpg instead of .jpeg you can simply rename the file names, it doesn't matter on modern operating systems.

Better Finder Rename

0

I've been grappling with this issue for a while, and realized the easiest solution is not to "export" the photos at all, but rather to simply copy the originals, which are already grouped by date taken in "Package Contents."

Right click on the iPhoto library, and select "Show Package Contents." Inside the hidden folder is a folder called "Masters" - all your images are there, sorted by date, with their original file names. Probably best to copy (rather than move) these to another folder, unless you want to discard everything in the library and start a new one afterwards.

1
  • This worked in Mojave and older only for original unmodified items - the Masters folder had folders by year, with sub-folders by month. But in Catalina and later, unmodified originals are in Originals folder - no year-wise folders and month-wise sub-folders any more, and GUID names instead of original file names; so it's a lot harder to find and export what you need.
    – MacEater
    Commented Mar 11, 2022 at 5:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .