FileModifyDate<DateTimeOriginal is off (sometimes?!)

Started by handvprice, September 27, 2021, 04:44:17 PM

Previous topic - Next topic

handvprice

Working with a jpg from an older Casio camera. "Exiftool img.jpg" shows DateTimeOriginal as 2007:06:14 15:28:33 (which matches the Date Taken in file properties). "Exiftool -v "-FileModifyDate<DateTimeOriginal" img.jpg" says "1 image files updated", but date modified shows as 15:28:34, and nothing I've tried can make exiftool write the correct modified time. Using the file's properties confirms that the file's modify date shows 15:28:34. And I checked that the file and the folder aren't read-only.

To make it weirder, copying the file to a different location, then trying the same exiftool command *does* succeed in writing the correct modified time.

I realize a hundredth of a second doesn't oridinarily matter, but I'm using a file comparison program which doesn't consider two files "equal" unless time is same to the hundredth...

StarGeek

It seems unlikely, but it might be that there is more than one DateTimeOriginal in the file.  Use the command in FAQ #3 to list duplicates and groups they belong to.

Otherwise, is the file on a FAT or NTFS drive?  Or something else, like a network drive?
* 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

Have you noticed that all date/time values on that disk are an even number of seconds?  This is not a coincidence.  Some Windows filesystems can not represent an odd number of seconds.

- 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

StackOverflow post on the subject. 

Learned something new!  Also found out that NTFS time stamps are in UTC, so they're adjusted to the local time zone (which I knew) but FAT fs is not and will show the same time stamp regardless of the local time zone. 
* 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).

handvprice

Appreciate all the answers.

Indeed, the problematic disk is formatted Exfat, and the file modified times on the pics on that drive are all even! I've never noticed that before. Makes me less a fan of exfat, despite its interoperability with mac and pc.

No second DateTimeOriginal entry.

(I'd run into the time zone problem and posted a question about it previously, but this was just a 1/100 sec problem).