Last active
January 3, 2021 06:15
-
-
Save cescapa/a0d8a2ed11095679eec0405748efe6b6 to your computer and use it in GitHub Desktop.
Modify creation date in OS X
This file contains hidden or 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
# newCreationTime is the Linux time stamp of the photo or video (seconds since 1970-1-1) | |
# mediaPath is the full path of the photo or video | |
import os | |
from datetime import datetime | |
os.system(f"SetFile -d \"{datetime.fromtimestamp(newCreationTime).strftime('%m/%d/%Y %H:%M:%S')}\" \"{mediaPath}\"") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment