ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: benton on August 05, 2019, 09:17:33 PM

Title: geotag and DateTimeOriginal
Post by: benton on August 05, 2019, 09:17:33 PM
Hello,

I am wanting to use exiftools to write GPS tags from an NMEA file to the image.

I have had some success using the following;

exiftool -geotag "GPSFolderName\GPSFileName.NMEA" ImageFolderName

But I have hit the following error;

Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in File:Geotime (ValueConvInv) - D:/FolderName/IMG/ImageName_x.jpg

I am not sure if the DateTimeOriginal tag is causing the problem but when the script ran successfully this is what the tag attribute looked like;

DateTimeOriginal - 2019:08:01 11:04:58

And when the script was not successful this is what the attribute looked like;

DateTimeOriginal - 2019-02-05T13:26:59

Is the 'T' above causing the problem?

Is this the problem and is there a way to remove the 'T' from 2019-02-05T13:26:59

Bn
Title: Re: geotag and DateTimeOriginal
Post by: StarGeek on August 05, 2019, 09:46:34 PM
Your dates are improperly formatted.  As the warning says, the date needs to be in the format of YYYY:mm:dd HH:MM:SS, not YYYY-mm-ddTHH:MM:SS.

See FAQ #5 (https://exiftool.org/faq.html#Q5) for more details.

In order to fix it, as FAQ 5 states, exiftool is flexible about the input format.  It can be fixed as simply as:
exiftool "-DateTimeOriginal<DateTimeOriginal" ProblemFile.jpg
Title: Re: geotag and DateTimeOriginal
Post by: benton on August 05, 2019, 10:33:55 PM
Hi StarGeek

Thank You

Bn