Question about wrong dates

Started by wlire, November 19, 2024, 11:27:52 AM

Previous topic - Next topic

wlire

I have a GoPro hero 8 and hero 10 which record times in local EST time, but this means that in windows it shows up as 5 hours behind. This issue is not present on GoPro 11 and newer. Is the recommended course of action to just shift all the time tags forward by 5 hours for the GoPro 8 and 10?

StarGeek

That would be reasonable as long as you understand the underlying properties of the date/time tags.

Most of the time stamps in a video are supposed to be set to UTC. Windows understands this and adjusts the displayed values accordingly. But if you look at the files in a time zone other than the one where it was taken, for example, viewing the data on a computer on the West Coast -08:00 time zone, Windows would display the time for that time zone, three hours earlier than what was displayed in an East Coast time zone.

But not all of the video time stamps are UTC. Specifically, the Quicktime:DateTimeOriginal and Quicktime:CreationDate (different from the Quicktime:CreateDate are supposed to be the local time zone where the video was taken.

Try this command
exiftool -GlobalTimeShift 5 -TagsFromFile @ -Quicktime:CreateDate -Quicktime:ModifyDate "-Track*Date" "-Media*Date" /path/to/files/

"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

wlire

#2
For some context, here is the outputs when running the command: exiftool.exe -time:all -g1 -a -s "file.mp4"

For hero10:
---- System ----
FileModifyDate                  : 2024:04:13 17:19:47-04:00
FileAccessDate                  : 2024:11:19 23:09:23-05:00
FileCreateDate                  : 2024:11:19 23:08:25-05:00
---- QuickTime ----
CreateDate                      : 2024:04:13 17:14:27
ModifyDate                      : 2024:04:13 17:14:27
---- Track1 ----
TrackCreateDate                : 2024:04:13 17:14:27
TrackModifyDate                : 2024:04:13 17:14:27
MediaCreateDate                : 2024:04:13 17:14:27
MediaModifyDate                : 2024:04:13 17:14:27
---- Track2 ----
TrackCreateDate                : 2024:04:13 17:14:27
TrackModifyDate                : 2024:04:13 17:14:27
MediaCreateDate                : 2024:04:13 17:14:27
MediaModifyDate                : 2024:04:13 17:14:27
---- Track3 ----
TrackCreateDate                : 2024:04:13 17:14:27
TrackModifyDate                : 2024:04:13 17:14:27
MediaCreateDate                : 2024:04:13 17:14:27
MediaModifyDate                : 2024:04:13 17:14:27
---- Track4 ----
TrackCreateDate                : 2024:04:13 17:14:27
TrackModifyDate                : 2024:04:13 17:14:27
MediaCreateDate                : 2024:04:13 17:14:27
MediaModifyDate                : 2024:04:13 17:14:27


For hero11 mini:
---- System ----
FileModifyDate                  : 2023:03:31 21:59:36-04:00
FileAccessDate                  : 2024:11:19 23:11:39-05:00
FileCreateDate                  : 2024:11:19 23:08:00-05:00
---- QuickTime ----
CreateDate                      : 2023:04:01 01:57:30
ModifyDate                      : 2023:04:01 01:57:30
---- Track1 ----
TrackCreateDate                : 2023:04:01 01:57:30
TrackModifyDate                : 2023:04:01 01:57:30
MediaCreateDate                : 2023:04:01 01:57:30
MediaModifyDate                : 2023:04:01 01:57:30
---- Track2 ----
TrackCreateDate                : 2023:04:01 01:57:30
TrackModifyDate                : 2023:04:01 01:57:30
MediaCreateDate                : 2023:04:01 01:57:30
MediaModifyDate                : 2023:04:01 01:57:30
---- Track3 ----
TrackCreateDate                : 2023:04:01 01:57:30
TrackModifyDate                : 2023:04:01 01:57:30
MediaCreateDate                : 2023:04:01 01:57:30
MediaModifyDate                : 2023:04:01 01:57:30
---- Track4 ----
TrackCreateDate                : 2023:04:01 01:57:30
TrackModifyDate                : 2023:04:01 01:57:30
MediaCreateDate                : 2023:04:01 01:57:30
MediaModifyDate                : 2023:04:01 01:57:30


For reference, the h11 file was filmed at 2023:04:01 21:57:30 EST, h10 file was filmed at 2024:04:13 17:14:27 EST

So i am guessing I would need to modify the h10 to be in UTC by moving it forward, is that all that needs to be done?

StarGeek

Quote from: wlire on November 19, 2024, 11:18:52 PMSo i am guessing I would need to modify the h10 to be in UTC by moving it forward, is that all that needs to be done?

Yes. In this case, since the FileModifyDate is accurate, I would suggest this command (use CMD, not PowerShell)
exiftool -api QuickTimeUTC -wm w "-Time:All<$FileModifyDate" /path/to/files/

This will copy the FileModifyDate into all time stamps in the file. The [`-wm w` option](https://exiftool.org/exiftool_pod.html#wm-MODE--writeMode) is used to only write existing tags, otherwise dozens of new, unwanted tags would be created. The -api QuickTimeUTC option will automatically adjust the time stamps from local to UTC.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

wlire

Quote from: StarGeek on November 20, 2024, 12:23:50 PM
Quote from: wlire on November 19, 2024, 11:18:52 PMSo i am guessing I would need to modify the h10 to be in UTC by moving it forward, is that all that needs to be done?

Yes. In this case, since the FileModifyDate is accurate, I would suggest this command (use CMD, not PowerShell)
exiftool -api QuickTimeUTC -wm w "-Time:All<$FileModifyDate" /path/to/files/

This will copy the FileModifyDate into all time stamps in the file. The [`-wm w` option](https://exiftool.org/exiftool_pod.html#wm-MODE--writeMode) is used to only write existing tags, otherwise dozens of new, unwanted tags would be created. The -api QuickTimeUTC option will automatically adjust the time stamps from local to UTC.

One question about this, the system file modify date signifies the time that the recording has stopped, where as the quicktime times are when the recording started. So instead of copying the system file modify date, can I just offset all the quicktime times 4 hours forward? In addition to this, I would like to preserve the existing system file modify date

StarGeek

Quote from: wlire on November 20, 2024, 04:11:50 PMSo instead of copying the system file modify date, can I just offset all the quicktime times 4 hours forward?

You can use the GlobalTimeShift option with -TagsFromFile

QuoteIn addition to this, I would like to preserve the existing system file modify date

Add the -P (-preserve) option.

Test this first, but the command would be something like
exiftool -P -GlobalTimeShift 4 -TagsFromFile @ -Time:All /path/to/files/
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

wlire

Quote from: StarGeek on November 20, 2024, 05:19:45 PM
Quote from: wlire on November 20, 2024, 04:11:50 PMSo instead of copying the system file modify date, can I just offset all the quicktime times 4 hours forward?

You can use the GlobalTimeShift option with -TagsFromFile

QuoteIn addition to this, I would like to preserve the existing system file modify date

Add the -P (-preserve) option.

Test this first, but the command would be something like
exiftool -P -GlobalTimeShift 4 -TagsFromFile @ -Time:All /path/to/files/


For some reason, when i have globaltimeshift set to 0 instead 4 it gives me the result I was looking for (dates are now in utc like the h11) however there is also an XMP tag created:
[XMP-xmp]       CreateDate                      : 2024:04:13 17:14:27
[XMP-xmp]       ModifyDate                      : 2024:04:13 17:14:27

Is there a way I can exclude this? And what would be the reason for the dates shifting by the correct amount when I put 0 instead of 4 for globaltimeshift?