ExifTool Forum

ExifTool => Newbies => Topic started by: krash002 on March 23, 2025, 05:28:03 PM

Title: Performing time shift based on `FileModifyDate` tag value
Post by: krash002 on March 23, 2025, 05:28:03 PM
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.
Title: Re: Performing time shift based on `FileModifyDate` tag value
Post by: StarGeek on March 23, 2025, 05:37:49 PM
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/