ExifTool Forum

ExifTool => Newbies => Topic started by: Widescreen on April 23, 2019, 05:09:42 AM

Title: Date and timezone in videos
Post by: Widescreen on April 23, 2019, 05:09:42 AM
Hi everyone, and thanks Mr Harvey for this awesome program.

I am struggling with the timezone value after dates. Is there nay way to change it?

This is the reason:
I have successfully copied the FileModifyDate value to CreateDate in some m4v videos:
exiftool "-FileModifyDate>CreateDate" -P DIR
With those m4v the timezone value was not copied from the one in FileModifyDate. Just the time and date. I then shifted the time to put it in UTC like it should. Good.
But when I ran the same command with .mov files taken with an action cam, the timezone info from FileModifyDate was actually copied in the CreateDate tag. Despite this it looks like Google Photos is not taking this information into account. So I have to put it in UTC too. So I end up with an UTC time and a wrong timezone value. I'm concerned that at some point Google Photos or any other program might use this information and shift the time accordingly.
Hence my question: is there a way to remove the timezone value appended in the CreateDate tag (or any other tag), or at least to set it to +00:00 to avoid any future problem and remain consistent across my files?

Hope this is clear, thanks for the help!
Title: Re: Date and timezone in videos
Post by: Hayo Baan on April 23, 2019, 06:40:34 AM
Since you want the times to be UTC, you might find adding -api QuickTimeUTC=1 to the command solves your problem.

Background: the QuickTime spec stipulates that QuickTime dates should be UTC. Many cameras, however, use the local time instead. Because of this exiftool by default assumes the times are local, even though this is incorrect according to the spec. By adding -api QuickTimeUTC=1 you are again telling exiftool to adhere to the standard.

Hope this helps,
Hayo
Title: Re: Date and timezone in videos
Post by: Widescreen on April 23, 2019, 07:52:32 AM
Thanks! I will try this.
Alternatively is there a command that can change a date from:
2019:04:23 14:00:00+02:00
To:
2019:04:23 14:00:00
Or:
2019:04:23 14:00:00+00:00

Thanks!
Title: Re: Date and timezone in videos
Post by: StarGeek on April 23, 2019, 11:35:41 AM
To just remove the time zone and not shift the time?

To remove the time zone if it is already in the file
exiftool -P -d "%Y:%m:%d %H:%M:%S" -TagsFromFile @ -CreateDate FileOrDir

To use in your original command
exiftool "-FileModifyDate>CreateDate" -P -d "%Y:%m:%d %H:%M:%S" DIR
Title: Re: Date and timezone in videos
Post by: Phil Harvey on April 23, 2019, 11:47:48 AM
Note that some QuickTime date/time tags will always show the system time zone if -api quicktimeutc is used.  With these, the only way to remove the time zone is to not use the QuickTimeUTC option, and the only way to change the timezone when QuickTimeUTC is used is to change the system time zone.

- Phil
Title: Re: Date and timezone in videos
Post by: Widescreen on April 23, 2019, 01:33:03 PM
Very clear, thanks a lot!