Guides

Wrong dates after Google Takeout, and how to fix them

Published

You exported your Google Photos library with Takeout and unzipped it. Now File Explorer, your NAS or your new photo app shows years of pictures on one day: the day you downloaded them. Or some photos land in the right year and others do not.

Two different dates are involved, and usually only one of them is wrong.

Which date is wrong

A photo or video has a date on the file, and often a second date inside it.

So a photo straight from a phone camera usually still carries its date. An app that reads the date inside the file shows it on the right day. An app that sorts by file date shows the download day.

Which files have their date only in the .json

Some files never had a date inside, or Google Photos knows a better one:

For these files, the date Google Photos showed you is in the .json file next to the photo, under photoTakenTime. What the .json files hold shows the rest of it.

Photos dated 1970

A date of 1 January 1970, or 31 December 1969 in time zones west of UTC, is what a time of 0 looks like. The .json counts time in seconds from midnight UTC on 1 January 1970, so somewhere along the way a program read or wrote 0 instead of the real time.

Check your own files

One photo

  1. Right-click the photo in File Explorer, choose Properties, then the Details tab.
  2. Look at Date taken, under Origin. If it shows a date, the photo carries its date inside. If it is empty, Windows found none. Windows does not read every format, so a PNG or a video can have a date that this field does not show.
  3. Open the photo's .json in Notepad and find photoTakenTime. Its timestamp is the moment the photo was taken, in seconds since 1 January 1970, UTC.

To turn that number into a date, put it in place of the one in this line and run it in PowerShell:

[DateTimeOffset]::FromUnixTimeSeconds(1565627400).UtcDateTime

This one prints 12 August 2019, 4:30 PM, in your Windows date format. The time is UTC, not the local time where the photo was taken.

A whole folder

With ExifTool installed (the merge guide shows how), this lists every file that has neither a photo date (DateTimeOriginal) nor a video date (QuickTime:CreateDate) inside. Run it in Command Prompt, with your folder in place of D:\Takeout:

exiftool -q -q -r --ext json -if "not $DateTimeOriginal and (not $QuickTime:CreateDate or $QuickTime:CreateDate eq '0000:00:00 00:00:00')" -p "$Directory/$FileName" "D:\Takeout"

The files it prints are the ones whose date lives only in the .json, or nowhere.

Fix it yourself, for free

Whichever you choose, work on a copy, and keep the zip files until you have checked the result.

Where the free way falls short

Datestitch in about a minute

Datestitch is a Windows app made for this one job.

  1. Drop in your Takeout zip files as Google gave them, or the folder you unzipped them into. Add every part of one export at once.
  2. The preview shows how many files get a date, where each date comes from, and which files have none. Nothing is copied yet, and the preview is free.
  3. Choose a new, empty folder and click Copy and fix. Each copy gets its date and place written inside and its file date set, sorted by year and month or by album. A report lists every file and what is left to sort by hand.

When a photo already has a date and the .json agrees within a day, it keeps the photo's own. When they differ by more, it writes the .json's, the date Google Photos showed you. Dates go in the local time of the photo's place when Google or the photo knows it, otherwise in your PC's time zone, and the report marks those files.

Two photos in the preview, each with the export's date struck through and the date from its .json below
The preview, on the sample export that comes with the app. The struck-through date is each file's date in the export; under it is the date from Google's .json, in the time zone of the photo's place. The edited copy on the left gets its original's date.

What Datestitch does not do

We have tested Datestitch only on exports we built to imitate a Takeout, in five account languages. It has not yet run on a real Google Takeout.