News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

AllDates+=1 doesn't change modification time

Started by farance, March 17, 2015, 11:49:23 AM

Previous topic - Next topic

farance

Running 9.90 on Win7 64-bit.

So I have a camera that I forgot to set for Daylight Saving Time.  I tried the following:

exiftool -AllDates+=1 dir

but that left the modification time as  the present time, not the original modification time plus one hour.  Any ideas?

Phil Harvey

Yes.  AllDates is a Shortcut tag, documented here.

But note that the suggestion of using -time:all+= will not shift FileModifyDate because it is a the modification date/time because it is an "unsafe" tag.  So this must be shifted separately with -filemodifydate+=.

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

farance

Thank you for the prompt reply.  I've been using your tool for years, and it doesn't work the way it used to.  In fact, I come back to using your tool every 6 months when we change the clocks.

I suggest you update the documentation to make this clear.  When I google'd and found your page:

http://www.exiftool.org/

It said:

"For convenience, a shortcut tag called AllDates has been defined to represent these three tags. So, for example, if you forgot to set your camera clock back 1 hour at the end of daylight savings time in the fall, you can fix the images with:

    exiftool -AllDates-=1 DIR

See Image::ExifTool::Shift.pl (download in PDF format) for details about the syntax of the time shift string."

which, in fact, doesn't work (or doesn't work like it used to) because the file modification times are now changed to current time.  Could you update the above documentation to include the

-filemodifydate-=1

option?  I just tried it and it appeared work.

Also, it would be helpful if all the related documents were listed near the top of the page ... I couldn't find the tag listing (the link you pointed to above) in the command documentation page.  Although re-reading the document above, I did find the link, but it was embedded well into the document ... I shouldn't have to read the whole document to discover all of the related documents.

One more thing: your suggestion did not work on AVI files that came out of my camera.  Yes, I understand there isn't EXIF tags in the file, but *from a user perspective*, it means that I have to use multiple tools/scripts to modify the files from my camera: exiftool is necessary for the JPEGs, but some other shell script for the AVI files.  It would be much easier for exiftool to do what it can with what it has.

Again, thanks for your help and prompt response.

Phil Harvey

This behaviour has never changed.  FileModifyDate has always been set to the current date/time when writing (unless it is specifically set to something else, or the -P option is used).

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

farance

Ok, possibly my memory is faulty.  Still, if you can update the documentation to include:

(1) the -filemodifydate-=1 option (because that is the behavior, I believe, people expect), and

(2) a catalog/roadmap of documents,

that would be helpful. Thanks.

Phil Harvey

Quote from: farance on March 17, 2015, 01:35:56 PM
Ok, possibly my memory is faulty.  Still, if you can update the documentation to include:

(1) the -filemodifydate-=1 option (because that is the behavior, I believe, people expect)

Thanks for the suggestion, I'll see if I can work this in.

Quote(2) a catalog/roadmap of documents

This is more difficult.  From the ExifTool home page, there are already 259 separate links into the tag name documentation (plus, they are extensively cross-linked).  If I generated a separate index to all of the documentation pages it would be too long for the home page, so one would just as easily miss this link as the "Tag Names" link in the top link bar of the home page (this is the bar with "Installing", "Tag Names", "Resources", etc...).  But I find that some people don't realize that this bar is clickable, maybe this is the problem.

- 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: farance on March 17, 2015, 01:35:56 PM
(1) the -filemodifydate-=1 option (because that is the behavior, I believe, people expect), and

Actually, this is not the behavior expected of FileModifyDate.  The FileModifyDate is a property of the underlying file system and is expected to change whenever a file is modified.  It's a property of all files, not just files that ExifTool can deal with.  Wikipedia  describes it as "The date and time when the file was last accessed for write, even if no writes were actually performed."
* 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).

Phil Harvey

I agree with StarGeek.  However farance isn't the only one to be confused by this, so I have modified the Date/Time Shift section of the ExifTool home page to add a note about this.

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