I am trying to generate a gpx file from a large number of iphone photos. The iphone does not add GPS date/time in the image metadata. I would like to use datetimeoriginal in the format file but need to add a timeshift to convert the time to UTC. I have not been able to find a way to do this. My only other option is to write the GPS date/time tags into every photo exif and then run gpx.fmt using gpsdatetime. I would prefer not to have to do this. Any guidance would be greatly appreciated.
iOS 15.5 or later doesn't seem to have GPSTimeStamp anymore (only GPSDateStamp).
But OffsetTime (and SubSecDateTimeOriginal) is there. So GPSTimeStamp can be added with:
exiftool -m -P -overwrite_original_in_place '-GPS*Stamp<SubSecDateTimeOriginal' .
If there is no OffsetTime, use something like this and timeshift GPS timezone to UTC, if necessary (here -3 hours):
exiftool -m -P -overwrite_original_in_place '-GPS*Stamp<DateTimeOriginal' .
exiftool -m -P -overwrite_original_in_place '-GPS*Stamp-=00:00:00 03:00:00' .
https://exiftool.org/forum/index.php?topic=13648.msg73671#msg73671
p.s. I have started to learn .gpx, .kml, and related Google Maps, Google Earth etc just a few days ago so correct me, if necessary.
- Matti
The ExifTool -geotag option allows you to specify a time zone, eg)
exiftool -geotag LOGFILE.gpx "-Geotime<${DateTimeOriginal}-05:00" DIR
See -geotime option on the Geotagging page (https://exiftool.org/geotag.html#geotime) for more information.
Alternatively, you could use the -geosync option, but that would only be necessary if your camera clock needs adjusting.
- Phil