News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

GPSTimeStamp does not work with userParam?

Started by Ravefiend, May 09, 2019, 04:50:28 AM

Previous topic - Next topic

Ravefiend

Attempting to sync up all relevant date and time values, I had put together the following:

exiftool -overwrite_original_in_place "-EXIF:DateTimeOriginal<-$newDate" "-EXIF:CreateDate<-$newDate" "-EXIF:ModifyDate<-$newDate" "-EXIF:GPSDateStamp<-$newDate" "-EXIF:GPSTimeStamp<-$newDate" "-EXIF:GPSDateStamp<-$newDate" -userParam newDate="2019:04:19 17:30:00" "IMG_20190419_173000 orig_005 IMG_20190419_191933_cr.jpg"

This does not set GPSTimeStamp correctly:

exiftool -time:all -a -G0:1 -s "IMG_20190419_173000 orig_005 IMG_20190419_191933_cr.jpg" |grep GPS
[EXIF:GPS]      GPSTimeStamp                    : 00:00:00
[EXIF:GPS]      GPSDateStamp                    : 2019:04:19
[Composite]     GPSDateTime                     : 2019:04:19 00:00:00Z


What does work is the following (as suggested in https://exiftool.org/forum/index.php?topic=8955.0 )

exiftool "-EXIF:GPSDateStamp<EXIF:DateTimeOriginal" "-EXIF:GPSTimeStamp<EXIF:DateTimeOriginal" "IMG_20190419_173000 orig_005 IMG_20190419_191933_cr.jpg"

Result:

exiftool -time:all -a -G0:1 -s "IMG_20190419_173000 orig_005 IMG_20190419_191933_cr.jpg"
[File:System]   FileModifyDate                  : 2019:05:09 10:45:35+02:00
[File:System]   FileAccessDate                  : 2019:05:09 10:45:35+02:00
[File:System]   FileCreateDate                  : 2019:05:09 10:16:56+02:00
[EXIF:IFD0]     ModifyDate                      : 2019:04:19 17:30:00
[EXIF:ExifIFD]  DateTimeOriginal                : 2019:04:19 17:30:00
[EXIF:ExifIFD]  CreateDate                      : 2019:04:19 17:30:00
[EXIF:ExifIFD]  SubSecTime                      : 744741
[EXIF:ExifIFD]  SubSecTimeOriginal              : 744741
[EXIF:ExifIFD]  SubSecTimeDigitized             : 744741
[EXIF:GPS]      GPSTimeStamp                    : 17:30:00
[EXIF:GPS]      GPSDateStamp                    : 2019:04:19
[ICC_Profile:ICC-header] ProfileDateTime        : 2016:12:08 09:38:28
[Composite]     GPSDateTime                     : 2019:04:19 17:30:00Z
[Composite]     SubSecCreateDate                : 2019:04:19 17:30:00.744741
[Composite]     SubSecDateTimeOriginal          : 2019:04:19 17:30:00.744741
[Composite]     SubSecModifyDate                : 2019:04:19 17:30:00.744741


Is this a limitation of userParam, can it not be used to set GPSTimeStamp?

Phil Harvey

This should work:

exiftool -overwrite_original_in_place "-EXIF:DateTimeOriginal<$newDate" "-EXIF:CreateDate<$newDate" "-EXIF:ModifyDate<$newDate" "-EXIF:GPSDateStamp<$newDate" "-EXIF:GPSTimeStamp<$newDate" "-EXIF:GPSDateStamp<$newDate" -userParam newDate="2019:04:19 17:30:00" "IMG_20190419_173000 orig_005 IMG_20190419_191933_cr.jpg"

I'm not sure why you thought you needed the "-" before "$newDate", but it was messing up the parsing of the GPSTimeStamp. (similar to common mistake 5a perhaps?)

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

Ravefiend

Aha, that was the needle in my haystack! I must have picked it up from some example and did not consider the '-' should not be used.

Tested your modified command and can confirm it works as expected.

Thanks a lot Phil, and kudos to you for your effortless support!