Wrong date on images downloaded from Google Photos

Started by Keitaro, October 06, 2022, 06:23:23 PM

Previous topic - Next topic

Keitaro

Hi, I am new around here.

I would like to keep a copy of my Google photos on my computer.

However when I download from Google Photos, all the dates are wrong and are dated as the date of download

I also tried to use Google Takeout but the dates is wrong too.

I understand that you can merge the JSON and  image file so that the original date will be displayed.

Could anyone explain what is the command to use in order to merge the JSON and Jpg file?

As I also have plenty of images,let me know if I do it in bulk

Thank you

Phil Harvey

First, you should try this command to see which, if any, dates in the files are correct:

exiftool -time:all -a -G1 -s FILE

Then, if some are correct and others aren't, you can use exifTool to copy the good ones to overwrite the bad with a command like this:

exiftool "-baddatetag<gooddatetag" ... FILE

If there aren't any good date/times, then go to the JSON file and run the above command to see what date/times are correct in the JSON file.  In this case, you may have to take the date/time from a "timestamp" tag (seconds since Jan 1, 1970) and use the exiftool -d option to convert this to a date, like this:

exiftool -tagsfromfile some_file.json "-baddatetag<sometimestamp" -d %s FILE

or to run this on all files in a directory, assuming they are JPG files and the JSON filename is the same but with a ".json" added:

exiftool -tagsfromfile %d%f.%e.json "-baddatetag<sometimestamp" -d %s -ext jpg DIR

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).