Trouble with GPSDateTime in PNG

Started by Happy Hobo, January 20, 2023, 02:50:44 AM

Previous topic - Next topic

Happy Hobo

WGroleau@MBP 31日 % exiftool -time:all -G1 -a -s England/*PNG | grep GPSDateTime
[XMP-exif]      GPSDateTime                     : 2017:10:31 19:16:09Z
[Composite]     GPSDateTime                     : 2017:10:31 19:13:07Z
[XMP-exif]      GPSDateTime                     : 2017:10:31 20:32:03Z
[Composite]     GPSDateTime                     : 2017:10:31 19:13:07Z
"exiftool -p (path)/gpx.fmt" is using the incorrect value on the composite line.  How can I change that value OR change the file to use the other value? 
exiftool -GPSDateTime='2017:10:31 19:16:09Z' England/20171031_181609.PNG
exiftool -GPSDateTime='2017:10:31 20:32:03Z' England/20171031_193203.PNG
fails but the same syntax worked on all my other images (jpg & HEIC).  Will it work if I convert the .PNG files to .jpg?

StarGeek

You should check the file to see the other GPS time stamps in the file.  Most likely there's the GPSDateStamp/GPSTimeStamp tags in the file as well.  Try this command to double check the gps tags (assuming Mac/Linux due to the use of grep)
exiftool -G1 -a -s '-gps*' /path/to/files/

If the other two time stamps exist in the file, you might consider fixing them
exiftool "-GPSDateStamp<XMP:GPSDateTime" "-GPSTimeStamp<XMP:GPSDateTime" /path/to/files/

Otherwise, you'll have to edit the gpx.fmt.  Change
#[BODY]  <time>${gpsdatetime#;my ($ss)=/\.\d+/g;DateFmt("%Y-%m-%dT%H:%M:%SZ");s/Z/${ss}Z/ if $ss}</time>into
#[BODY]  <time>${XMP:gpsdatetime#;my ($ss)=/\.\d+/g;DateFmt("%Y-%m-%dT%H:%M:%SZ");s/Z/${ss}Z/ if $ss}</time>
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

Happy Hobo

Quote from: StarGeek on January 20, 2023, 12:15:15 PMIf the other two time stamps exist in the file, you might consider fixing them
exiftool "-GPSDateStamp<XMP:GPSDateTime" "-GPSTimeStamp<XMP:GPSDateTime" /path/to/files/
Will it hurt anything to run this command if "the other two time stamps [do not] exist in the file"?  If not, I can just add the command to my script that I run on multiple images.

StarGeek

* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).