Created
August 2, 2019 13:14
-
-
Save fidelthomet/65237990651daf1fce7d26e49283c7c7 to your computer and use it in GitHub Desktop.
batch offset timestamps in photos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in DP2Q*.*; do | |
ts="$(GetFileInfo -d "$f")" | |
e="$(date -j -f "%m/%d/%Y %H:%M:%S" "$ts" +%s)" | |
((o=60*60*24*60-27120)) | |
((e+=o)) | |
nd="$(date -r $e "+%m/%d/%Y %H:%M:%S")" | |
SetFile -m "$nd" "$f" | |
SetFile -d "$nd" "$f" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment