I have lots of m4a files in a directory and want to rename them all based on their CreateDate tag values, but I also need to perform time shift by the value indicated in FileModifyDate tag at the end (for me it can be either +02:00 or +03:00), how can I write that conditional logic to determine hours shift value? What I currently have is the following:
exiftool -d "%Y-%m-%d %H-%M-%S%%-c.%%e" -globaltimeshift "0:0:0 2:0:0" -ext m4a "-filename<CreateDate" FILEPATH
Which shifts by 2, even if FileModifyDate has 3 at the end...
Thanks.
Use the -api QuickTimeUTC option (https://exiftool.org/ExifTool.html#QuickTimeUTC) instead. That will shift the video UTC time stamps to local time based upon the computer's time zone.
exiftool -d "%Y-%m-%d %H-%M-%S%%-c.%%e" -ext m4a -api QuickTimeUTC "-filename<CreateDate" /path/to/files/