Author Topic: Changing only the timezone  (Read 3153 times)

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: Changing only the timezone
« Reply #15 on: April 10, 2019, 12:33:28 PM »
Sorry if I have been throwing out random ideas here, but I don't have time right now to read the whole thread in detail.

- 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 ($).

ragnor

  • Newbie
  • *
  • Posts: 7
Re: Changing only the timezone
« Reply #16 on: April 10, 2019, 12:59:06 PM »
As I said in my first response, the time stamp is supposed to be in UTC according to the spec.  Windows, for once, is actually reading the data correctly.  But other programs might not.  I'm not sure how Google Photos reads it.

You have to decide based upon what programs you use and how they read the timestamp if you want it to be technically correct and set to UTC time or set it the actual, local time it was shot.
Not sure if I understood correctly.
The time on my GoPro is synchronized with my phone. So it´s adjusted as the time in my timezone, and then assumed that it´s UTC in the timestamp.
I can correct that manually in the camera, using the time minus my time zone, but then tags for photos will be wrong.


@Phil: quicktimeutc option shows indeed the incorrect time + the timezone.

PS: now with the daylight hour change it´s even more messy, as now the new videos are +2.

StarGeek

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 2372
Re: Changing only the timezone
« Reply #17 on: April 10, 2019, 01:14:13 PM »
The time on my GoPro is synchronized with my phone. So it´s adjusted as the time in my timezone, and then assumed that it´s UTC in the timestamp.
I can correct that manually in the camera, using the time minus my time zone, but then tags for photos will be wrong.

And there lies the problem between video metadata timestamps and photo metadata timestamps.  The video time is supposed to be UTC according to the spec.  The photo time is supposed to be local time.  If you're taking both at the same time, one of them is going to be technically wrong, unless the software understands the difference, which is unlikely.  So you're going to have to correct one or the other.

Hayo's post shows you how to subtract an hour from the video timestamps.  I would expand upon that to include all the video timestamps with this command:
exiftool -quicktime:*Date-=1 GX011182.MP4
which would subtract 1 hour from the time in the file.  Change as needed.

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.

ragnor

  • Newbie
  • *
  • Posts: 7
Re: Changing only the timezone
« Reply #18 on: April 10, 2019, 02:22:43 PM »
Thanks for the comprehensive explanation!
It seems weird though that this only happens with GoPro. I never had this problem before with other cameras.

I will follow your advice and change the dates on the videos then.

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 938
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: Changing only the timezone
« Reply #19 on: April 10, 2019, 02:39:58 PM »
It seems weird though that this only happens with GoPro. I never had this problem before with other cameras.

I guess that's because most (?) cameras likely add time zone information into the relevant tags. Your GoPro sadly does not.
Hayo Baan – Photography
Web: www.hayobaan.nl

ragnor

  • Newbie
  • *
  • Posts: 7
Re: Changing only the timezone
« Reply #20 on: April 11, 2019, 07:24:45 AM »
It seems weird though that this only happens with GoPro. I never had this problem before with other cameras.

I guess that's because most (?) cameras likely add time zone information into the relevant tags. Your GoPro sadly does not.
So no way to add tags in the near future?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: Changing only the timezone
« Reply #21 on: April 11, 2019, 08:14:37 AM »
Specifically, what tag(s) do you want to add?

- 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 ($).

ragnor

  • Newbie
  • *
  • Posts: 7
Re: Changing only the timezone
« Reply #22 on: April 11, 2019, 12:36:54 PM »
I guess a Timezone tag would solve the issue, or am I missing something else?

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: Changing only the timezone
« Reply #23 on: April 11, 2019, 12:45:15 PM »
The QuickTime TimeZone tag is stored in a very weird location, and as such it won't be a high priority to add support for being able to create this tag.  So don't expect this in the near future.

I wish that video metadata was more standardized.  Even if I add the ability to write this, most other software probably won't read it.

- 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 ($).

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 938
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: Changing only the timezone
« Reply #24 on: April 11, 2019, 01:26:16 PM »
Hi Phil,

How about the TimeOffset tags instead?
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: Changing only the timezone
« Reply #25 on: April 11, 2019, 04:22:59 PM »
How about the TimeOffset tags instead?

You mean the EXIF OffsetTimeXxxx tags?  Nothing but ExifTool will read these from a video, so writing them won't be much use.

The first QuickTime tags that will be creatable in videos will be the ItemList and UserData tags.

- 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 ($).

Hayo Baan

  • Global Moderator
  • ExifTool Freak
  • *****
  • Posts: 938
  • Professional Photographer & Software Developer
    • Hayo Baan – Photography
Re: Changing only the timezone
« Reply #26 on: April 11, 2019, 10:32:50 PM »
You mean the EXIF OffsetTimeXxxx tags?  Nothing but ExifTool will read these from a video, so writing them won't be much use.
Yes, I meant those. Interesting that no one seems to read these… They are written by some cameras though (I've seen a capture from a Canon 1D X that has these tags). Note though that they aren't writeable in MP4 files at the moment by exiftool. Since they are simple (fixed length?) string tags in the EXIF block, I figured they shouldn't be too hard to support?

The first QuickTime tags that will be creatable in videos will be the ItemList and UserData tags.

Excellent!
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14438
    • ExifTool Home Page
Re: Changing only the timezone
« Reply #27 on: April 12, 2019, 07:16:34 AM »
Note though that they aren't writeable in MP4 files at the moment by exiftool. Since they are simple (fixed length?) string tags in the EXIF block, I figured they shouldn't be too hard to support?

Right.  I will be able to add support for editing existing EXIF without too much trouble, but I won't add the ability to create new EXIF in videos if it didn't already exist.

- 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 ($).