Author Topic: Help needed on modifying DateTimeOriginal on Canon CR2 Images  (Read 153 times)

Smajors

  • Newbie
  • *
  • Posts: 2
Help needed on modifying DateTimeOriginal on Canon CR2 Images
« on: January 01, 2019, 06:56:47 PM »
I am needing to adjust the Date/Time of a number of photos (a little over 1800 of them...) by adding 1 year and 9 hours

In Terminal (Mac) I run exiftool -time:all -s /FILE
This is what I get:
FileModifyDate                  : 2017:12:28 07:14:50-07:00
FileAccessDate                  : 2019:01:01 16:06:42-07:00
FileInodeChangeDate        : 2019:01:01 14:35:43-07:00
ModifyDate                      : 2017:12:28 07:14:46
DateTimeOriginal             : 2017:12:28 07:14:46
CreateDate                      : 2017:12:28 07:14:46
TimeZone                        : -06:00
TimeZoneCity                  : Denver
DaylightSavings               : On
SubSecTime                     : 82
SubSecTimeOriginal          : 82
SubSecTimeDigitized         : 82
SubSecCreateDate            : 2017:12:28 07:14:46.82
SubSecDateTimeOriginal   : 2017:12:28 07:14:46.82
SubSecModifyDate           : 2017:12:28 07:14:46.82

The line I am using to try and make the needed change is:
exiftool -DateTimeOriginal+=‘1:0:1 9:0:0’ /FILE

This gets me the following changes and error:
Error: File not found - 9:0:0’
FileModifyDate                  : 2019:01:01 16:00:04-07:00
FileAccessDate                  : 2019:01:01 16:00:17-07:00
FileInodeChangeDate             : 2019:01:01 16:00:04-07:00
ModifyDate                      : 2017:12:28 07:14:46
DateTimeOriginal             : 2017:12:28 07:14:46
CreateDate                      : 2017:12:28 07:14:46
TimeZone                        : -06:00
TimeZoneCity                  : Denver
DaylightSavings               : On
SubSecTime                     : 82
SubSecTimeOriginal          : 82
SubSecTimeDigitized         : 82
SubSecCreateDate            : 2017:12:28 07:14:46.82
SubSecDateTimeOriginal   : 2017:12:28 07:14:46.82
SubSecModifyDate           : 2017:12:28 07:14:46.82

So, I am clearly doing something incorrect as the metadata is saying I modified the image to today.
I want to modify the following by adding 1 year and 9 hours
ModifyDate                      : 2017:12:28 07:14:46
DateTimeOriginal             : 2017:12:28 07:14:46
CreateDate                      : 2017:12:28 07:14:46

Once I am successful with one image I will then do a batch process to the directory.

Any information would be appreciated and let me know if I can provide anymore details.
Thanks!

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2432
Re: Help needed on modifying DateTimeOriginal on Canon CR2 Images
« Reply #1 on: January 01, 2019, 08:24:11 PM »
Your command is ok, but you're using fancy quotes ‘ ’
You want to make sure you're using regular quotes '

If you're copy/pasting to a word processor or a Google doc, you'll have to make sure of the quotes, as word processors/Google will "help" you by automatically changing them for you.  OS X also has a setting that will do the same.
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Smajors

  • Newbie
  • *
  • Posts: 2
Re: Help needed on modifying DateTimeOriginal on Canon CR2 Images
« Reply #2 on: January 01, 2019, 09:11:54 PM »
Thanks- made that adjustment and worked.

I ran exiftool -AllDates+='1:0:0 9:0:0' /File
It made the appropriate changes as seen below. However, when viewing files in the folders these files are still showing as today (image attached) when I try to Arrange By Date Created. This might be more of a MAC OS issue but any suggestions appreciated.

FileModifyDate                  : 2019:01:01 18:55:31-07:00
FileAccessDate                  : 2019:01:01 18:55:31-07:00
FileInodeChangeDate        : 2019:01:01 18:55:31-07:00
ModifyDate                      : 2018:12:28 16:14:18
DateTimeOriginal              : 2018:12:28 16:14:18
CreateDate                      : 2018:12:28 16:14:18
TimeZone                        : -06:00
TimeZoneCity                  : Denver
DaylightSavings               : On
SubSecTime                    : 39
SubSecTimeOriginal           : 39
SubSecTimeDigitized         : 39
SubSecCreateDate            : 2018:12:28 16:14:18.39
SubSecDateTimeOriginal    : 2018:12:28 16:14:18.39
SubSecModifyDate             : 2018:12:28 16:14:18.39

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14597
    • ExifTool Home Page
Re: Help needed on modifying DateTimeOriginal on Canon CR2 Images
« Reply #3 on: January 02, 2019, 07:17:53 AM »
On Mac, the only way to preserve the file creation date is to use the -overwrite_original_in_place option.  See the application documentation for details.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).