I have a bunch of photos that I know were all taken in the same place. I would like to conditionally go and apply time zone information (Exif:OffsetTimeOriginal, OffsetTimeDigitized) to each file based on when DST occurred in my area (I have a list of all of the dates that this occurred for the files mentioned above). How would I go about doing that with an if statement in ExifTool?
Doing this one at date range at a time could go something like this (I'm pulling date/times out of thin air here):
exiftool -if "$createdate gt '2019:10:01 02:00' and $createdate lt '2020:04:01 02:00'" "-offsettimedigitized=-04:00" DIR
- Phil
Edit: Fixed incorrect quotes.
Thank you. Will give it a try. Any way of stringing multiples together in the if statement (else if behavior)
Sure. You can do this:
exiftool -if "$createdate gt '2017:10:02 02:00' and $createdate lt '2018:05:01 02:00' or $createdate gt '2018:10:05 02:00' and $createdate lt '2019:04:03 02:00' or $createdate gt '2019:10:01 02:00' and $createdate lt '2020:04:01 02:00'" "-offsettimedigitized=-04:00" DIR
- Phil
This did not work. It set all of the offsettimedigitized to the same value
Nevermind. I must've typed something down. Should've copied and pasted (and modified)