Modifying date stamps in EXIF data using EXIFTOOL

Started by LateJunction, June 02, 2023, 07:41:52 AM

Previous topic - Next topic

LateJunction

For reasons unknown to me (and irrelevant now) my camera had a wildly incorrect date when I was taking some important images yesterday. I have used EXIFTOOL in an attempt to correct the dates using the command:

exiftool "-DateTimeOriginal+=4:5:0" ~/Pictures/Digital_Source/2023/06/01

Exiftool reports that 12 images were updated, but when I look at the image EXIF data (using gthumb as a convenient GUI tool) I find that the date fields I most certainly expected to be changed are not touched. These include entries which gthumb lists as 'General Date & Time', 'Date and Time', 'Date and Time (original), and 'Date and Time (digitized)'. The only field that has been updated is named by gthumb as 'Modified Date & Time'. I have attached a sample screen shot (hopefully!).

Clearly I am mis-applying exiftool, but I cannot see where my error is.

Phil Harvey

DateTimeOriginal is just one possible place that this may be stored.  Use this command to see all date/time tags, and add necessary ones to your command:

exiftool -time:all -s FILE

You may use AllDates as a shortcut to change DateTimeOriginal, CreateDate and ModifyDate all together.

- 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 ($).

StarGeek

Quote from: LateJunction on June 02, 2023, 07:41:52 AMwhen I look at the image EXIF data (using gthumb as a convenient GUI tool) I find that the date fields I most certainly expected to be changed are not touched.

I'm not sure why you think exiftool is going to edit any tags other than the one you told it to edit.  If you look at your listing, "Date and Time (original)" has clearly be changed from the other two "Date and Time" tags.  The "Date and Time" listing is probably the ModifyDate (called "DateTime" by the EXIF standard) and "Date and Time (digitized)" is called CreateDate by exiftool ("DateTimeDigitized" by the standard).  As Phil says, all three can be changed at once with the AllDates Shortcuts tag, e.g. "-AllDates+=4:5:0"  Though you obviously don't want to apply that to the images you have already updated, as that would add anoter 4 hours, 5 minutes to the DateTimeOriginal in those images.  For these, you would have to use "-CreateDate+=4:5:0" "-ModifyDate+=4:5:0"


QuoteThe only field that has been updated is named by gthumb as 'Modified Date & Time'. I have attached a sample screen shot (hopefully!).

This probably is the file system time stamp, FileModifyDate.  You can prevent that from changing by adding the -P (-preserve) option.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).