Movie dates and Photos.app
I hope this helps someone with errors in movie dates. Unfortunately there is no standard for movie metadata dates like there is for images (support for Captions, Keywords etc is even worse).
'QuickTime' movie time stamps are stored as UTC and programs should display them as the local time. If you add the '-api QuickTimeUTC=1' option to exiftool, it will convert to/from UTC based upon the current time zone of the computer with DST adjustment.
On the other hand there are a couple other tags available for videos, most notably 'Keys:CreationDate' and 'UserData:DateTimeOriginal'. These tags are supposed to be local time and adding a time zone to those is supposed to be optional. But Apple, even though it's their standard, writes their programs so that if the time zone isn't included, you will get insanely inaccurate date/times. So exiftool by default will automatically add a time zone to those tags in video files.
Photos.app v6-7-8 (macOS 11-12-13 Big Sur - Monterey - Ventura) grabs the date in the following order from mp4, m4v and mov movie metadata tags (Photos.app 5 in macOS 10.15 Catalina is about the same, and Photos.app 4 in macOS 10.14 Mojave behaves slightly differently).
[Keys] CreationDate : 2004:04:04 12:04:04+02:00
[UserData] DateTimeOriginal : 2003:03:03 12:03:03+02:00
[QuickTime] CreateDate : 2002:02:02 12:02:02+02:00
[MacOS] FileCreateDate : 2001:01:01 12:01:01+02:00
1. 'Keys:CreationDate'. iOS (8.4)-9 or newer movies have this tag. (Notice that if the date tag lacks the timezone suffix like +02:00, Photos.app scrambles the year to something like '5828963' or otherwise displays wrong date for mp4, m4v and mov).
(2. 'UserData:DateTimeOriginal'. This tag is not so important because that 'Keys' date tag should override it. Some iOS movies have this tag but I don't know when it is generated. Photos ignores this tag in mov. (Notice that if the date tag lacks the timezone suffix like +02:00, Photos.app scrambles the year to something like '5828963' or otherwise displays wrong date for mp4 and m4v)).
3. 'QuickTime:CreateDate'. UTC time should be used. This tag is always present in mp4, m4v and mov H.264 and H.265 HEVC movies.
4. 'MacOS:FileCreateDate'.
So if there is no other metadata date in the movie, as a last resort Photos.app gets it from the file creation date.
Photos.app can display the timezone when it is added as a custom preference to macOS Language & Region > Advanced... > Times > drag the Time Zone to the Medium length format and set its format as desired (+02:00, for example). This option is not present in macOS 13.0 Ventura.
If there are no Keys or UserData date tags, Photos.app uses the GPS location for the timezone in .mp4, .m4v and .mov.
I recommend inserting the date in the filename in images and movies. GraphicConverter can do this automatically and its internal engine exiftool is quite flexible about that date format. GC filename default is YYYY-MM-DD hh.mm.ss but I dislike spaces in these filenames so I have always used YYYY-MMDD-hhmm-ss for my images and movies (2020-0703-1832-00.m4v, for example). GraphicConverter can adjust the filenames and the metadata dates but exiftool via the command line has a lot more options. There are many similar apps so pick the one you like (Disclaimer: I am just a satisfied GC user).
https://www.lemkesoft.de/en/products/graphicconverter/
To rename files via metadata dates choose GraphicConverter > File > Browse... > [select folder] > [select files] > File > Rename... > Name tab: Change filename: [blank] > Date tab: Add date to filename: Exif date, Date format default: YYYY-MM-DD hh.mm.ss (or YYYY-MMDD-hhmm-ss or almost anything you prefer).
GC can shift the metadata timestamps but you can also type another date to the filename and let GC adjust the metadata accordingly:
To set metadata dates via filename in movies and images choose GraphicConverter (v11.3.3 or later) > Camera menu > Set Exif Date to > Filename... > Match string default: YYYY-MM-DD hh.mm.ss (or YYYY-MMDD-hhmm-ss or almost anything you prefer), Set movie dates, Use UTC, Set the file date identical to the Exif date.
-> You can stop reading now if you don't want to use the Terminal...
You can use the following (exiftool -ver 12.16 or later) command to fix the dates in movies with a filename like YYYY-MMDD-hhmm-ss so they sort correctly with the images. In macOS the command asks for Xcode Command Line Tools install which can be ignored but then the FileCreateDate moves only backwards in time (the install is quite small and fast, not the huge Xcode install).
exiftool -api QuickTimeUTC=1 '-AllDates<filename' '-Track*Date<filename' '-Media*Date<filename' '-Keys:CreationDate<filename' -execute '-FileCreateDate<filename' '-FileModifyDate<filename' -common_args -m -P -overwrite_original_in_place -wm w .
In macOS 12 it works for 1904-01-01 01.39.49 or later for 'QuickTime' and 0001-01-01 00.00.00 or later for 'Keys' tags (in macOS 10.14-11 1677-09-21 01.52.33 or later for 'Keys' and 'UserData' tags). Below is the exiftool command that displays the date tags with the relevant output for such dates:
exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all .
[QuickTime] CreateDate : 1904:01:01 01:39:50+01:39
[Keys] CreationDate : 1677:09:21 01:52:33+01:40
[UserData] DateTimeOriginal : 1677:09:21 01:52:33+01:40
With the '-wm w' switch it modifies only existing date tags and doesn't add any new (there are too many overlapping movie date tags already!). The command replaces the originals so apply it to copies (it should be very safe, though). Those 'Keys' (and less important 'UserData') tags seem to support year 0001 or later in Photos.app 5-8 if they are set or added without '-wm w' with a targeted command like:
exiftool -m -overwrite_original_in_place '-Keys:CreationDate=0001:01:01 00:00:00+00:00' movie.mov
[Keys] CreationDate : 0001:01:01 00:00:00+00:00
Below is a exiftool command that shows only the date tags (-time:all), actual tag names (-s), what groups they belong to (-G1), duplicate tags (-a) and 'QuickTime' tags with system timezone (-api QuickTimeUTC=1. There are no time zones stored for any 'QuickTime' tags, the system ones aren't part of the file, and they reflect only the computer's system time zone):
exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all movie.mov
Show also MacOS FileCreateDate:
exiftool -a -G1 -s -api QuickTimeUTC=1 -time:all -api RequestAll=2 movie.mov
Using exiftool via the command line is not so difficult as it sounds. Just download the MacOS Package .dmg from exiftool main page and install it via ctrl-click > Open (to bypass the security check for applications that haven't a bought a certificate from Apple). Then, for example, put copies of the movies you want to process on the Desktop to a folder named 'movies' (don't put anything else there). Then open Applications > Utilities > Terminal.app, type 'cd ' (notice the space) and drag that 'movies' folder to the Terminal window and press Return to change to that folder (or type 'cd ~/Desktop/movies' followed by Return. '~' means your home folder). Then copy & paste the previous long command to the Terminal, press Return, and wait for all files in that folder to be processed. (The dot '.' at the end of the long command means 'this folder'. Or alternatively, omit that dot '.' at the end, and instead type the exact name of the file you want to process. Or type just the start of the filename, and then press Tab to use autocomplete and maybe insert '*' to the end, and hit Return to process all files that start with the same letters. Or add '-ext mp4' switch to the command to process only files that have .mp4 suffix (or add '-ext dv' to process .dv files that exiftool does not touch by default). That was a rather clumsy instruction but I guess you get the idea.
ExifTool discussion forum is very active and has good tips if you get stuck.
Some things I noticed when building the exiftool command that copies the date in the filename to metadata tags:
I tested some vacation movies in different timezones because my command puts the computer's timezone to them. But in practice movies from London, Beijing etc mix nicely with images which use local time instead UTC which 'QuickTime' (-api QuickTimeUTC=1) should use. BTW '-api QuickTimeUTC=1' automatically very nicely takes care of DST in winter and summer movies.
I noticed that the varying timezone display format from different tags might slightly mangle Photos.app sorting (+02:00 is sorted before an occasional Z etc). I hope Photos.app could be updated to use various sorting options.
My command tries to set all movie date tags the same so it is easier to troubleshoot if some app picks a wrong date. I also set the QuickTime 'Track*' tags the same although they are not used for sorting.
I had to separate '-FileCreateDate<filename' with '-execute' because it can only move backwards in time if it is combined with other commands.
There is no standard for embedding EXIF data in a movie but that has not stopped a lot of camera makers from forcing it into the file. If that kind of EXIF is inside an embedded ThumbnailImage (like in some Canon models), it might be edited or deleted if some app erroneously grabs it. The maker notes in most Canon movies are stored inside the ThumbnailImage, which is writable, so you can do something like this (it is 3 commands: the first to extract the thumbnail, the second to add metadata to the thumbnail, and the third to write the thumbnail back into the video):
exiftool -ThumbnailImage -b movie.mov | exiftool -Time:All='2020:01:01 12:00:00' -timezone='+02:00' -wm w - | exiftool -ThumbnailImage'<=-' movie.mov
exiftool -m -P -overwrite_original_in_place -wm w -Canon:ThumbnailImage= movie.mov
https://exiftool.org/forum/index.php?topic=13951.msg75028#msg75028
https://exiftool.org/forum/index.php?topic=13951.msg75078#msg75078
These are the standard video time stamps and part of the 'QuickTime' group. According to the standard, these are supposed to be in UTC, but it's up to you whether you want to make sure they are that way, depending upon what software you use with your files. Adobe programs read these tags as if they were local time, the same as a jpg or RAW file. Windows and Google photos will read them as per the spec as UTC time. So it's up to you as to what you want to do:
[QuickTime] CreateDate : 2019:01:10 16:59:23
[QuickTime] ModifyDate : 2019:01:10 16:59:23
[Track1] TrackCreateDate : 2019:01:10 16:59:23
[Track1] TrackModifyDate : 2019:01:10 16:59:23
[Track1] MediaCreateDate : 2019:01:10 16:59:23
[Track1] MediaModifyDate : 2019:01:10 16:59:23
[Track2] TrackCreateDate : 2019:01:10 16:59:23
[Track2] TrackModifyDate : 2019:01:10 16:59:23
[Track2] MediaCreateDate : 2019:01:10 16:59:23
[Track2] MediaModifyDate : 2019:01:10 16:59:23
My memo for other switches:
-ver -- show exiftool version number (use v12.16 production release or later).
-m -- Ignore minor errors and warnings. Final Cut Pro 10 m4v issue a minor warning without this.
-P -- Preserve file modification date/time.
-overwrite_original_in_place -- Overwrite original by copying tmp file. Mac file creation date, type, creator, label color, icon, Finder tags, other extended attributes and hard links to the file preserved.
-wm w -- only write existing tags (no new tags are created).
-api QuickTimeUTC=1 -- 'QuickTime' movie time stamps are stored as UTC and programs should adjust them to the local time. If you add the '-api QuickTimeUTC=1' option to exiftool, it will convert to/from UTC based upon the current time zone of the computer with DST adjustment.
-AllDates -- Shortcut to 'DateTimeOriginal', 'CreateDate' and 'ModifyDate' in images (not so good for movies because it does not touch 'Keys'. Notice: you need exiftool 12.13 or later to write timezone to 'UserData:DateTimeOriginal' -- if there is no timezone suffix like +02:00, Photos.app 6.0 scrambles the year to something like '5828963' or otherwise displays wrong date for mp4 and m4v).
-rsrc:all= -- Delete resource fork.
-common_args -- All arguments following this option are common to all executed commands when -execute is used. This option and its arguments MUST come after all other options on the command line.
-api LargeFileSupport=1 -- With large (over ~2GB) files add to the command, if there is 'LargeFileSupport not enabled' message.
Single quotes is a good habit to get into using exiftool on Mac/Linux. Use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).
p.s. Google Photos behaves little differently (YMMV because in the late 1800's many countries switched to local timezones but in my location that happened May 1st 1921 with +20 min 10.9 sec adjustment):
Images (.jpg) after 01.01.1902 use 'ExifIFD:DateTimeOriginal' (Google Photos does not support older dates -- 01.01.1901 08:00:00 is displayed as 06.12.1969 21:09:00, for example).
Movies (mp4, m4v and mov) after 1970-0101-0000-00 (limit at UTC midnight) can simply use 'QuickTime:CreateDate'.
Movies before 1970 must use 'Keys:CreationDate' (in mp4 the timezone must be subtracted from the time i.e. 1921-0501-1200-00 should be set at 1921:05:01 10:00:00+02:00, for example).
Movies before 1921-0501-00-00 must use 'Keys:CreationDate' (in mp4 20 minutes 11 seconds must be added to the previously calculated time combined with a modified timezone +01:40 i.e. 1902-0101-1200-00 should be set at 1902:01:01 10:20:11+01:40, for example).
Before year 1902 'Keys:CreationDate' works even to year 0001 but then Google Photos might randomly display a wrong date and even if it displays the correct date, it might sort that movie incorrectly.
-end-