ExifTool Forum

ExifTool => Newbies => Topic started by: pstein on September 16, 2024, 07:57:16 AM

Title: How to add 1 day + 14 min to all EXIF lastmodified-timestamps?
Post by: pstein on September 16, 2024, 07:57:16 AM
How can I add (as a sample) 1 day + 14 minutes to all EXIF lastmodified timestamps?
Title: Re: How to add 1 day + 14 min to all EXIF lastmodified-timestamps?
Post by: StarGeek on September 16, 2024, 05:25:13 PM
This example (https://exiftool.org/exiftool_pod.html#exiftool--DateTimeOriginal--0:0:0-1:30:0-dir) in the docs shows you how to do it.

To shift all the EXIF time stamps forward 1 day and 14 minutes, you would use this command
exiftool -AllDates+="1 0:14:0" /path/to/files/

The format for the amount of time to shift is
-TAG±="Year:Month:Day Hour:Minute:Second"
Change ± into a plus or minus. You can drop any leading zero parts. In your example, I dropped the Year and Month because those weren't being shifted. And there must be a space between the Day and the Hour. Without the space, the first number defaults to Hours shifted.

But from the way you worded your question, I suspect that the EXIF timestamps are not really what you want to change, as the EXIF:ModifyDate really isn't used by any program. I think what you want to change is the file system modify data.

Use this command to see all the date/time tags in a file
exiftool -time:all -G1 -a -s file.jpg
See which one has the current value you see with your "lastmodified timestamps" and replace AllDates in the above command with the name of that tag. It is likely to be FileModifyDate.
Title: Re: How to add 1 day + 14 min to all EXIF lastmodified-timestamps?
Post by: pstein on September 17, 2024, 02:24:44 AM
Thank you