GPS-date & time to all other date/time fields

Started by linuxuser, November 30, 2017, 06:12:57 PM

Previous topic - Next topic

linuxuser

How can I copy the gps date and time to all other date / time fields except makernotes?

Phil Harvey

Tricky.  But you could try something like this:

exiftool -wm w "-*date*<gpsdatetime" "-all:all<makernotes:time:all" FILE

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

linuxuser

#2
Thanks, I forgot to mention, that there has to be a correction from UTC to local time.

I assume exiftool cannot calculate the timezome according to the coordinates, using a service like osm, geonames or google (a free key is needed), but a manual value for the correction, would help too.

The problem arises when the camera firmware is dumb and writes an exif-time independent from the built-in-gps and in a 2nd szenario when you are changing borders often on a day with different timezones and you don't change the time in the camera everytime when you change the border (eg, when the border is open, like between Spain and Portugal this situation is not rare). The situation can become complex, when you are on a flight with different timezones and DST.

AFAIK there is a python-module to calculate the timezone from the coordinates.


Phil Harvey

That gets much trickier.  ExifTool doesn't have the ability to calculate time zone from GSP coordinates.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

linuxuser

https://www.exiftool.org/index.html#shift describes how to change the time of photos in a directory. Probably this cannot be combined with your suggestion for the gps-time, you have written above.

https://www.exiftool.org/history.html mentions
Nov. 16, 2017 - Version 10.67
Added TimeZone option

Can you explain what this means or where I can read more about this?

I don't find the photo anymore, but I think I have something seen like "timezone" with value 0 in the metadata.


[EXIF]          0x9003 Date/Time Original              : 2017:11:30 22:56:19
[IPTC]          0x003c Time Created                    : 22:56:19+01:00
[IPTC]          0x003f Digital Creation Time           : 22:56:19+01:00


So there are fields which show the timezone somehow, probably useless because it depends on the camera settings.

I think about what is the best on flights, when crossing timezones or when travelling. Until know I keep the local time and change the local time with exiftool at home. Sometimes it is not so easy to split the photos according to the timezone. I write the trackpoint in the metadata of the photo and compare it with the kml-file. After I found out, when it gets wrong, I edit the time. It sometimes not so easy to recognize the location of an aerial view. So I am looking for a better workflow. UTC has advantages, but at the end the exif-time should be local.

Phil Harvey

Quote from: linuxuser on December 02, 2017, 01:47:34 PM
Added TimeZone option

Can you explain what this means or where I can read more about this?

It is an API option, so the documentation is here, but I don't know how satisfying this description will be.  Basically, it just allows you to specify the default time zone instead of having ExifTool use the system time zone, but it doesn't work with the Windows .exe version.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

linuxuser