Skip to content

Instantly share code, notes, and snippets.

@erjiang
Created March 6, 2020 02:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erjiang/cc0b0aa4242c805823113b329a8c333b to your computer and use it in GitHub Desktop.
Save erjiang/cc0b0aa4242c805823113b329a8c333b to your computer and use it in GitHub Desktop.
#!/bin/bash
# This command can fix timezone offsets for Nikon D850 RAW photos.
# Other vendors may have different date/time metadata.
# the hours offset should be the difference in hours to add to the camera's time
HOURS_OFFSET=20:00:00
# this should be the location's actual TZ offset
NEW_OFFSET=+13:00
exiftool -ModifyDate+=$HOURS_OFFSET -CreateDate+=$HOURS_OFFSET -OffsetTime=$NEW_OFFSET -OffsetTimeOriginal=$NEW_OFFSET -OffsetTimeDigitized=$NEW_OFFSET -TimeZone=$NEW_OFFSET -DateTimeOriginal+=$HOURS_OFFSET -overwrite_original *.NEF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment