How do I add missing metadata after using exiftool to change Date/Time?

Started by human42, July 09, 2023, 09:09:12 PM

Previous topic - Next topic

human42

I am comparing 2 .jpg images side by side to verify my changes and I noticed there are 9 lines of metadata that have been removed from the original.
The command I used to make changes are:

exiftool -time:all="year:month:day hour:min:sec" -wm w "FILE"

And the lines of meta that are missing after making changes are:

Zone Identifier
Offset Time
Offset Time Original
Offset Time Digitized
Sub Sec Time Original
Sub Sec Time Digitized
Create Date
Date/Time Original
Modify Date

Why did these go missing? And how can I add them back to the original places?

Phil Harvey

ZoneIdentifier - this is not stored in the file.  It is a Windows file attribute that will be lost when the file is edited.  Adding -overwrite_original_in_place may preserve this, but I can't be sure.

OffsetTime(s) - these are deleted because you the time you specified didn't contain a time zone

SubSecTime(s) - these are Composite tags, (ie. composed of other existing tag values) and aren't generated because the time zones (OffsetTimes) no longer exist.

CreateDate/DateTimeOriginal/ModifyDate - the command shouldn't delete these unless there was some problem with the syntax.  We can provide more details if you provide an original test file.

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