Thanks for the examples. This is helpful for me to better understand the use case.
Before I go on, I want to clarify one point that you probably already know. UTC is the only time that is the “real” time. UTC = GMT = Zulu (Z) time. They are all the same. Time zone information is only a modification to the display of the time.
Here are some comments that might help both of our understanding.
- Phone
This statement does not match my expectation. The phone always stores the time information in UTC. And when you change time zones on the phone, UTC does not change as stored in the metadata. However, changing time zones might change the way the phone chooses to display the date in the file name (as you mentioned). Also, for the file modification time, the display in the windows properties panel will depend on the time zone of the computer displaying the properties. This is illustrated in this picture:
When determining the creation_date, Shotcut prefers the metadata over the file modification time.
- GoPro
If this is the case, my advice is to set the time on all these cameras to UTC time (no matter what time zone you are in)
If you set the time to UTC, it will always be correct no matter what time zone you are recording in. However, the camera operator may need to do some mental math to convert to local time if they need to use the camera’s time for some reason.
- DJI
If it gets time from GPS, then the time is UTC - probably why it always works.
Your suggestion is valid and captured well in this post. However, I think it is unlikely that anyone will implement it. And if someone does implement it, I do not know if it would be accepted into the code base.
I am, however, interested in two things:
- Creating a guide for our users to help them know how to set the time on their devices for the best results (your writeup in this post is a good start)
- Improving the time detection in Shotcut so we get the best results.
As an example for #2, we added some special logic for iphones because some Apple devices re-encode the files after the recording is finished and then the metadata changes. So we prefer the “apple.quicktime.creationdate” metadata over the “creation_time” metadata.
Maybe other devices have similar tricks that we do not know about.
In general, the calculation for the date goes as follows:
- Use the user set creation date (if present)
- Use apple.quicktime.creationdate metadata (if present)
- Use creation_time metadata (if present)
- Use the file modification time (as a last resort)
If you find some devices for which the time is set correctly, but Shotcut does not detect the time you expect, you can share the file with me and I can try to make it work better. Also, you can inspect the metadata tab in the properties panel to try to interpret where the time determination is going wrong.