Shift am to pm and enable daylight savings

Started by hamza141, May 10, 2022, 01:14:27 AM

Previous topic - Next topic

hamza141

Just got a bunch of pics back from a photographer in Florida. On the first look it looked like his camera was off by 12 hours so I tried:
exiftool.exe "-alldates+=0:0:0 12:00:0" .

Upon more careful looking it turns out the timezone was set to -05:00 but the east coast is currently on -04:00 because of daylight savings. Not sure how to fix this.

Here's what one of the original pics taken at 02:57 pm EDT looks like:
exiftool -time:all -G1 -a -s .\some_pic.jpg

[System]        FileModifyDate                  : 2022:05:09 21:26:01-04:00
[System]        FileAccessDate                  : 2022:05:10 01:09:28-04:00
[System]        FileCreateDate                  : 2022:05:09 23:05:21-04:00
[IFD0]          ModifyDate                      : 2022:05:06 02:57:18
[ExifIFD]       DateTimeOriginal                : 2022:05:06 02:57:18
[ExifIFD]       CreateDate                      : 2022:05:06 02:57:18
[ExifIFD]       OffsetTime                      : -05:00
[ExifIFD]       OffsetTimeOriginal              : -05:00
[ExifIFD]       OffsetTimeDigitized             : -05:00
[Canon]         TimeZone                        : -05:00
[Canon]         TimeZoneCity                    : New York
[Canon]         DaylightSavings                 : Off
[ExifIFD]       SubSecTime                      : 73
[ExifIFD]       SubSecTimeOriginal              : 73
[ExifIFD]       SubSecTimeDigitized             : 73
[Composite]     SubSecCreateDate                : 2022:05:06 02:57:18.73-05:00
[Composite]     SubSecDateTimeOriginal          : 2022:05:06 02:57:18.73-05:00
[Composite]     SubSecModifyDate                : 2022:05:06 02:57:18.73-05:00


I'd also like the reset the FileModifyDate and FileCreateDate. I know that after everything else is set I can just run:
exiftool -FileModifyDate<CreateDate -FileCreateDate<CreateDate .

StarGeek

Quote from: hamza141 on May 10, 2022, 01:14:27 AM
Here's what one of the original pics taken at 02:57 pm EDT looks like:

So the time is off by 12 hours, but is the day 2022:05:06 correct or does it need to be shifted back to 2022:05:05, as your original command should have shifted the day forward.

The command I think you want to use is
exiftool -OffsetTime*=-04:00 -DaylightSavings=On -alldates-=12 /path/to/files/

That will shift the time back the 12 hours you incremented it, change the time zone tags to the correct time zone, and set the Canon Daylight savings tag to on.  I believe that you don't want to touch the Canon:TimeZone.  At least on my Nikon, when it becomes Daylight Savings time, you just change the setting for that and don't actually touch the time zone that is set in the camera unless you are actually in another 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).

hamza141

The day 2022:05:06 is correct so no need to change the date.

Thanks that worked!

The commands I listed above were run on test files so in the end all I had to do was run these commands on the real data:
exiftool -OffsetTime*=-04:00 -DaylightSavings=On -alldates+=12 .
exiftool -FileModifyDate<CreateDate -FileCreateDate<CreateDate .

This allowed me to move the timestamp from early morning ~3 am to ~3 pm and update the timezone to -04:00 with daylight savings on.

The end files look something like this:

[System]        FileModifyDate                  : 2022:05:06 14:57:18-04:00
[System]        FileAccessDate                  : 2022:05:11 03:28:05-04:00
[System]        FileCreateDate                  : 2022:05:06 14:57:18-04:00
[IFD0]          ModifyDate                      : 2022:05:06 14:57:18
[ExifIFD]       DateTimeOriginal                : 2022:05:06 14:57:18
[ExifIFD]       CreateDate                      : 2022:05:06 14:57:18
[ExifIFD]       OffsetTime                      : -04:00
[ExifIFD]       OffsetTimeOriginal              : -04:00
[ExifIFD]       OffsetTimeDigitized             : -04:00
[Canon]         TimeZone                        : -05:00
[Canon]         TimeZoneCity                    : New York
[Canon]         DaylightSavings                 : On
[ExifIFD]       SubSecTime                      : 73
[ExifIFD]       SubSecTimeOriginal              : 73
[ExifIFD]       SubSecTimeDigitized             : 73
[Composite]     SubSecCreateDate                : 2022:05:06 14:57:18.73-04:00
[Composite]     SubSecDateTimeOriginal          : 2022:05:06 14:57:18.73-04:00
[Composite]     SubSecModifyDate                : 2022:05:06 14:57:18.73-04:00


Thanks once again!