Author Topic: Date and timezone in videos  (Read 177 times)

Widescreen

  • Newbie
  • *
  • Posts: 3
Date and timezone in videos
« 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!

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 1055
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: Date and timezone in videos
« Reply #1 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
Hayo Baan – Photography
Web: www.hayobaan.nl

Widescreen

  • Newbie
  • *
  • Posts: 3
Re: Date and timezone in videos
« Reply #2 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!

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2516
Re: Date and timezone in videos
« Reply #3 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
Troubleshooting hints:
* When posting, include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).
* Double all percent signs (%) in a Windows batch file.
* If your GPS coords are negative, make sure and set the GpsLatitudeRef and GpsLongitudeRef tags correctly.

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14759
    • ExifTool Home Page
Re: Date and timezone in videos
« Reply #4 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
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Widescreen

  • Newbie
  • *
  • Posts: 3
Re: Date and timezone in videos
« Reply #5 on: April 23, 2019, 01:33:03 PM »
Very clear, thanks a lot!