JPG image dating

I recently did some final editing of a darktable file on GIMP and then exported my result to a JPG file for storage. The original file and the GIMP output now contain entirely different time stamps and thus will not sort in adjacent locations. How can I edit the JPG embedded date information to correct the situation?

use EXIFtool to copy the correct time stamp.

Hermann-Josef

1 Like

if you run
exiftool -G

You should observe that “[exif] Create Date” or “[exif] Date/Time Original” contains the correct time stamp i.e. time photo was taken.
You should use those tags if you want to sort your images by date.

I need to change a JPG date to the same date as a RAW

That’s clear.

But the problem is that in a JPEG photo or a raw file, I can find a lot of tags with dates. for instance a jpeg created by GIMP:

command; exiftool -time:all -a -G0:1 -s <myfile>

[File]          File Modification Date/Time     : 2020:04:04 21:30:31+02:00
[File]          File Access Date/Time           : 2020:04:04 21:30:31+02:00
[File]          File Creation Date/Time         : 2020:04:04 21:30:30+02:00
[EXIF]          Date/Time Original              : 2015:11:21 08:17:07
[EXIF]          Create Date                     : 2015:11:21 08:17:07
[IPTC]          Date Created                    : 2020:04:04
[IPTC]          Time Created                    : 21:30:16-21:30
[Composite]     Create Date                     : 2015:11:21 08:17:07.17
[Composite]     Date/Time Original              : 2015:11:21 08:17:07.17
[Composite]     Modify Date                     : 2020:04:04 21:30:16.17
[Composite]     Date/Time Created               : 2020:04:04 21:30:16-21:30

[File] group dates : they are managed by your OS and thus can be modified by it without warning. For raw file it is certainly the date when you copied the file from your camera card to your HDD
[Composite] group dates: they are derived from other tags
[IPTC] group dates: updated or not by different SW. That can indicate the date of last processing
[EXIF] group dates: They are not modified by SW and copied unchanged. I can say that photo was taken at 2015:11:21 08:17:07

So you have to rely on [EXIF] dates. The others have no real meaning unless you copy [EXIF] date in it.

So there remain two questions:

  • Is there a tag where date is ok
  • Where you want to copy it.

For instance, I want to copy [exif]create date in the [File] creation date and mofification date

exiftool "-FileCreateDate<CreateDate" "-FileModifyDate<CreateDate" <myfile>

But the simplest and secure way is to use the exif dates to manage your photos. Other dates can be useful to keep trace of last processing date. but file dates can be dangerous.

Note TBC: on Windows there is a metadata named Date taken. I think it is extracted from [EXIF]Date/Time original if it exists. You can sort your photos with that field in Windows Explorer.

I do exiftool -TagsFromFile which works for me but I have heard it also copies many other tags. Some photographers don’t want that.

I think GIMP isn’t really a photo processing software by design that is why it does not preserve original time stamps.

It copies only the tags you instruct it to copy in the command line. Bad command implies bad result . It’s the Swiss knife for exif data.

It is difficult to answer as I don’t know what tags you think should be kept.
Some dates are invariant as [EXIF]dates, others are (or must) be modified by OS or by processing SW (depends on SW).
As I made demonstration above, GIMP preserves the invariant [exif] tags that are the basis for photo management.

I wouldn’t rely on any information associated with the exiftool:FileCreateDate tag to persistently reflect the date of the original capture, as that is information sourced from the operating system-maintained file data and there’s no guarantee as a file is copied around that it will stay the way you intend here. The only file copy software I know of that will explicitly preserve the file timestamps is, in unix, cp -p.

IMHO the only ways to carry that date forward are 1) in the EXIF:DateTimeOriginal, or 2) incorporate that date in the filename.

2 Likes