Hello Phil,
Time zone with or without daylight saving time is not included in the creation date format with this command:
exiftool -api QuickTimeUTC "-CreationDate<FileName" -overwrite_original /Users/Fulco/Test/20190421130102.mov
1 image files updated
exiftool -CreationDate /Users/Fulco/Test/20190421130102.mov
Creation Date : 2019:04:21 13:01:02
Still, I can achieve that by applying this command:
exiftool '-CreationDate<${FileName;s/^(\d{14}).*/$1+0200/}' -overwrite_original /Users/Fulco/Test/20190421130102.mov
1 image files updated
exiftool -CreationDate /Users/Fulco/Test/20190421130102.mov
Creation Date : 2019:04:21 13:01:02+02:00
Can Exiftool also do this automatically without specifying yourself the time zone and eventual daylight saving time?
Regards,
Fulco
You want to add the time zone of the system at the specified date/time? This is a bit tricky, but if you are willing to also set FileModifyDate, you could do this:
exiftool "-FileModifyDate<FileName" -execute -api QuickTimeUTC "-CreationDate<FileModifyDate" -overwrite_original -common_args /Users/Fulco/Test/20190421130102.mov
- Phil
Indeed, a bit tricky, but very helpful. Thanks again!
Regards,
Fulco
Just one observation: this will assume local time so the command will not work correctly for files taken in a different time zone from your own.
P.S. If you always want to have the -api QuickTimeUTC applied, you can add it to your .ExifTool_config. E.g. like so:
# Quicktime Date/Times are in UTC
$Image::ExifTool::UserDefined::Options{QuickTimeUTC} = 1;
I will try that! Thanks Hayo!