ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: dupont on December 25, 2019, 05:44:08 PM

Title: Modify Date could not be changed
Post by: dupont on December 25, 2019, 05:44:08 PM
I am trying to shift all date fields from a Sony RAW file (.ARW) two days with the command:

exiftool "-AllDates+=0:0:2 0" "-ModifyDate+=0:0:2 0" "-SonyDateTime+=0:0:2 0" .

However, it appears that the most important "Modify Date", as shown from an example file below, was not shifted.

Question: What is going on, and how can I shift "Modify Date"?


original
File Modification Date/Time     : 2019:12:25 11:17:48-08:00
File Access Date/Time           : 2019:12:25 14:37:41-08:00
File Inode Change Date/Time     : 2019:12:25 11:17:48-08:00
Date/Time Original              : 2019:12:19 11:07:42
Create Date                     : 2019:12:19 11:07:42
Sony Date Time                  : 2019:12:19 11:07:42
Modify Date                     : 2019:12:19 11:07:42
Create Date                     : 2019:12:19 11:07:42-08:00
Date/Time Original              : 2019:12:19 11:07:42-08:00
Modify Date                     : 2019:12:19 11:07:42-08:00

after command
File Modification Date/Time     : 2019:12:25 14:37:41-08:00
File Access Date/Time           : 2019:12:25 14:37:40-08:00
File Inode Change Date/Time     : 2019:12:25 14:37:41-08:00
Date/Time Original              : 2019:12:21 11:07:42
Create Date                     : 2019:12:21 11:07:42
Sony Date Time                  : 2019:12:21 11:07:42
Modify Date                     : 2019:12:19 11:07:42
Create Date                     : 2019:12:21 11:07:42-08:00
Date/Time Original              : 2019:12:21 11:07:42-08:00
Modify Date                     : 2019:12:19 11:07:42-08:00


Title: Re: Modify Date could not be changed
Post by: StarGeek on December 25, 2019, 06:20:51 PM
Run this command to see possible duplicate tags and their locations (see FAQ #3 (https://exiftool.org/faq.html#Q3))
exiftool -a -G1 -s File.jpg

If you can provide a sample file, that would be helpful as well.
Title: Re: Modify Date could not be changed
Post by: dupont on December 26, 2019, 01:44:11 PM
Thank you for the quick reply.

Here is the result of the command

exiftool -a -G1 -s test.ARW | grep Date


[System]        FileModifyDate                  : 2019:12:26 08:39:58-08:00
[System]        FileAccessDate                  : 2019:12:26 08:40:37-08:00
[System]        FileInodeChangeDate             : 2019:12:26 08:39:58-08:00
[IFD0]          ModifyDate                      : 2019:12:20 20:00:57
[ExifIFD]       DateTimeOriginal                : 2019:12:20 20:00:57
[ExifIFD]       CreateDate                      : 2019:12:20 20:00:57
[Sony]          SonyDateTime                    : 2019:12:20 20:00:57
[IFD1]          ModifyDate                      : 2020:12:18 20:00:57
[Composite]     SubSecCreateDate                : 2019:12:20 20:00:57-08:00
[Composite]     SubSecDateTimeOriginal          : 2019:12:20 20:00:57-08:00
[Composite]     SubSecModifyDate                : 2020:12:18 20:00:57-08:00


It would appear that there were two occurrences of ModifyDate and ExifTool only shifted the first one. The following did the job:
exiftool "-IFD1:ModifyDate+=0:0:2 0" test.ARW

Title: Re: Modify Date could not be changed
Post by: StarGeek on December 26, 2019, 02:18:43 PM
I believe that ModifyDate in IDF1 is non-standard, which is why it doesn't get shifted.
Title: Re: Modify Date could not be changed
Post by: Phil Harvey on December 26, 2019, 02:51:22 PM
Using the -v2 option, you can see what ExifTool will do when you try to shift ModifyDate:

> exiftool -modifydate+=1 -v2 test.jpg
Shifting PDF:ModifyDate if tag exists
Shifting MIE-Doc:ModifyDate if tag exists
Shifting PNG:ModifyDate if tag exists
Shifting PostScript:ModifyDate if tag exists
Shifting QuickTime:ModifyDate if tag exists
Shifting XMP-xmp:ModifyDate if tag exists
Shifting IFD0:ModifyDate if tag exists


As StarGeek mentioned, IFD1 is not the standard EXIF location for ModifyDate, so you must specify IFD1 if you want ExifTool to write it.  By default, ExifTool writes ModifyDate only to IFD0 in EXIF.

- Phil