Why photos from a Telegram export show the wrong date, and how to get the real dates back
You exported a chat from Telegram Desktop to keep its photos, opened the folder, and every picture says it was taken today. Nothing is broken. The files really are new: Telegram made them today. The dates you want are in the same folder, in a different place.
Why every file shows the export date
A photo app decides where a picture goes on your timeline by reading a field inside the file: the EXIF tag DateTimeOriginal, shown as “Date Taken”. For videos it reads the creation date stored inside the MP4 or MOV. When a file has neither, the app falls back to the file’s own date.
- Photos sent the normal way carry no camera date. Telegram compresses them and the copy it stores has no
DateTimeOriginal. Videos it compresses often come back with an empty creation date too. - The file date is the export date. Telegram Desktop downloads every file again when it builds the export, so each one is created on your computer at that moment.
So years of photos land on one day.
Where the real dates are
An export has the date of every message in up to three places.
| Place | When you have it | What it looks like |
|---|---|---|
result.json | Exports in JSON format | "date_unixtime": "1684056151" next to "photo": "photos/photo_12@…jpg" |
messages.html, messages2.html… | Exports in HTML format (the default) | title="14.05.2023 10:22:31 UTC+01:00" on the time of each message, and a link to the file |
| The file name | Photos, and files Telegram had to name itself | photo_12@14-05-2023_10-22-31.jpg (day-month-year, then the time) |
In result.json each message is an entry like this one. photo (or file, for videos, voice messages and documents) is the path of the file inside the export folder:
{
"id": 8841,
"type": "message",
"date": "2023-05-14T10:22:31",
"date_unixtime": "1684056151",
"from": "Mom",
"photo": "photos/photo_12@14-05-2023_10-22-31.jpg"
}date is the local time of the computer that made the export. date_unixtime is the same moment as seconds counted from January 1, 1970 (UTC), so it does not depend on a time zone.
Media files are sorted by type: photos/, video_files/, round_video_messages/, voice_messages/, stickers/, and files/ for anything sent as a file. A full account export (“Export Telegram data”) has one folder per chat, chats/chat_001/, chats/chat_002/…, each with the same subfolders.
Sent date vs. date taken
The date in the export is when the message was sent. For a photo taken and shared on the spot, that is the day it was taken. For a photo someone forwarded years later, it is not. Telegram keeps no other date for photos sent the normal way, so no tool can recover the camera date for those.
The exception is media sent as a file (“Send without compression”). Telegram delivers those byte for byte, so a JPEG from a camera still has its own DateTimeOriginal, and a video still has its own creation date. A careful fix leaves those files alone and uses the date they already carry.
How to export a chat in Telegram Desktop
Export exists only in Telegram Desktop for Windows, Mac and Linux (the app from desktop.telegram.org), not in the phone apps.
- Open the chat, click the ⋮ menu at the top right, and choose Export chat history.
- Check Photos and Videos, plus anything else you want (voice messages, stickers, files).
- Raise the size limit slider if the chat has long videos. Files over the limit are left out of the export.
- Pick the format: HTML, JSON, or both. Any of them works for fixing dates. JSON is the most complete.
- Choose where to save it and click Export. By default it goes to
Downloads/Telegram Desktop/ChatExport_….
To export every chat at once: Settings → Advanced → Export Telegram data. If you already have an export, you do not need a new one.
Put the dates back in your browser
Choose your export folder. TeleRedate matches each photo and video to its message, writes the sent date into the file and sorts everything into year folders. Nothing is uploaded, and there is no Telegram login. Free for 25 files.
Fix my exportDoing it by hand, or with a script
For a handful of photos, read the date from the file name (photo_12@14-05-2023_10-22-31.jpg was sent on May 14, 2023 at 10:22) and set it in your photo app. Google Photos and Apple Photos both let you edit the date of a photo.
For a whole chat, the usual route is ExifTool plus a script that reads result.json and calls it for each file. ExifTool can write both the EXIF date of photos and the QuickTime dates of videos. You need to install it, write the matching yourself, and run it from a command line.
If you have no export and prefer to pull the media straight from your account, Chronogram TG is an open-source desktop app that signs in to Telegram with your account and an API key, downloads a chat’s photos and videos again, and stamps them with the message date.
FAQ
Do I need the JSON export?
No. The HTML export has the same dates in messages.html. JSON is simply easier for tools to read.
Will the date be the day the photo was taken?
It will be the day it was sent in Telegram. Often that is the same day. For forwarded or old photos it is later. Only media sent as a file keeps its own camera date.
Does this work for videos?
Yes. The date goes into the video file itself (the mvhd, tkhd and mdhd fields of an MP4 or MOV), which is where photo apps look. The video is not re-encoded.
Some of my photos are missing from the export. Why?
The export only contains the media types you checked, up to the size limit you set. In result.json a skipped file shows a sentence such as “File not included. Change data exporting settings to download.” in place of its path. Export again with those boxes checked and a higher size limit.