Author Topic: Timezone issue when geotagging  (Read 173 times)

gyrex

  • Newbie
  • *
  • Posts: 2
Timezone issue when geotagging
« on: March 19, 2019, 08:15:09 AM »
Hi everyone,

I've been using exiftool for a couple of years now but ran into an interesting issue the other day and I'm hoping someone might be able to help me if possible?

I took some photos the other day in Brisbane, Australia (UTC +10) then I had to fly to Sydney (UTC +11). My Macbook changed timezone to Sydney automatically and when I went to geotag my photos using KML's I download from my Google Maps Timeline, I noticed that the photos were all geotagged incorrectly using my positions an hour ahead of where they should have been.

I fixed them afterwards by manually setting my timezone back to Brisbane time but I was wondering why it did this? I would have thought that it would have worked out the timezones itself? Is there any way to fix this for future (albeit unlikely) scenarios where I'm in a different timezone to where I took the photos?

Many thanks in advance and thanks for a sensational tool!

John


Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14895
    • ExifTool Home Page
Re: Timezone issue when geotagging
« Reply #1 on: March 19, 2019, 08:20:25 AM »
Hi John,

If no time zone is specified when setting the Geotime, then the system time zone is assumed.  If this is different than the time zone of the camera, then you will have this problem.

By default, "-Geotime<DateTimeOriginal#" is assumed when geotagging unless otherwise specified.  The best option would be to use a tag other than DateTimeOriginal which has time zone information, but if this isn't available from your camera then a work-around is to add a timezone manually.  See the geotime section here for details.

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

gyrex

  • Newbie
  • *
  • Posts: 2
Re: Timezone issue when geotagging
« Reply #2 on: March 19, 2019, 08:27:39 AM »
Wow, thanks for your prompt response Phil.

I did read the geotime section but I must admit, I was a little confused by most of that section. My camera (Sony a7R3) does include some offset information (does this satisfy your timezone information) and can I use this to geotag correctly? I'm sorry if I'm asking stupid questions but I'm honestly confused by the geotag section. Here's an output from one of my raw files:

Code: [Select]
[System]        FileModifyDate                  : 2019:03:15 12:05:38+11:00
[System]        FileAccessDate                  : 2019:03:19 23:37:20+11:00
[System]        FileInodeChangeDate             : 2019:03:17 08:47:11+11:00
[IFD0]          ModifyDate                      : 2019:03:15 11:05:39
[ExifIFD]       DateTimeOriginal                : 2019:03:15 11:05:39
[ExifIFD]       CreateDate                      : 2019:03:15 11:05:39
[ExifIFD]       OffsetTime                      : +10:00
[ExifIFD]       OffsetTimeOriginal              : +10:00
[ExifIFD]       OffsetTimeDigitized             : +10:00
[Sony]          SonyDateTime                    : 2019:03:15 11:05:39
[IFD1]          ModifyDate                      : 2019:03:15 11:05:39
[Composite]     SubSecCreateDate                : 2019:03:15 11:05:39+10:00
[Composite]     SubSecDateTimeOriginal          : 2019:03:15 11:05:39+10:00
[Composite]     SubSecModifyDate                : 2019:03:15 11:05:39+10:00

Edit: Modified to include exif output per Phil's suggestion below
« Last Edit: March 19, 2019, 09:01:12 AM by gyrex »

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 14895
    • ExifTool Home Page
Re: Timezone issue when geotagging
« Reply #3 on: March 19, 2019, 08:48:25 AM »
Things would be much more clear if you had extracted the information with this command (a la FAQ 3):

exiftool -time:all -a -G1 -s FILE

which makes the SubSecDateTimeOriginal tag more apparent.  So this should do what you want:

exiftool -geotag your.kml "-geotime<subsecdatetimeoriginal" DIR

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