Takeout JSON
EN

Unzip Photos and Keep Their Original Dates

Why photos from a .zip, .7z or .tar archive sometimes all show the same date, which unzip tools keep each file's date, and how to get the real date back.

Photos from an archive keep their original dates when two things hold: the archive stored each file's date, and the tool that unpacks it writes that date back. Windows File Explorer, macOS Archive Utility, 7-Zip and tar all write the stored date back. When every photo still shows the same day, the archive itself stored the day it was made, not the day of each photo. Then the date has to come from inside the photos.

What an archive stores

Each file in a .zip, .7z or .tar carries a date: the file's modified date at the moment it was packed.

  • Packed from your own computer: usually the real file dates. Unpacking with any normal tool gives them back.
  • Downloaded from a cloud service: Google Takeout, Google Drive, OneDrive and Dropbox build the archive on their servers. Many entries get the date the archive was made. Every photo then unpacks with the same day, whatever tool you use.
  • Zip details: a .zip stores local time to two seconds, with no time zone. A photo packed in one time zone and unpacked in another can be off by hours. .7z and .tar store exact times.

Which tools keep the stored date

ToolKeeps the stored date
Windows File Explorer, "Extract all"yes
7-Zipyes
macOS Archive Utility (double-click)yes
unzip and tar on Mac and Linuxyes
Some phone and browser unzip appsnot always

If photos from your own archive come out dated today, the tool is the problem. Try another one.

When the archive has the wrong date

The file date is only the last resort. The real date usually exists elsewhere:

  1. Inside the photo. Camera and phone photos carry a date taken in their EXIF. Most photo apps sort by that and ignore the file date. Check it in the photo's properties.
  2. In a .json file beside the photo. Google Takeout puts the real date there and removes it from many photos. See why Google Takeout photos have the wrong date.
  3. In the file name. IMG_20190714_110500.jpg, Screenshot_20190714-110500.png, IMG-20190714-WA0018.jpg all say when.

A tool can read these in that order and write the date back into the photo and onto the file, so every app agrees.

With the app

Photo Date & Metadata Fixer has a .zip & archives tab. Drop in .zip, .7z or .tar files (also .tar.gz, .tgz, .tar.bz2 and .tar.xz). The app unpacks each archive into its own folder and keeps each file's stored date. Then it gives every photo its real date from the .json file, the photo itself, or the archive, in that order, renames it, and sorts it into the folders you pick, such as Year / Month.

On Windows, the same tab inside Android Phone (Windows only) sends the result straight to the phone with every date right. RAR archives are not supported.

Frequently asked questions

Why do my unzipped photos show the right date in the gallery but the wrong one in File Explorer?

The gallery reads the date taken inside the photo. File Explorer's "Date modified" column shows the file date, which came from the archive. Add the Date taken column in File Explorer to see the one that matters.

Does unzipping twice change the dates?

No. Each unpack writes the same stored dates again.

Is a Google Takeout zip different?

Yes: it comes with a .json file for each photo, which holds the real date and place. The Google Photos Takeout tab reads them; see how to get the correct date in Google Takeout photos.