GPSDateStamp anomaly in iPhone 5s iOS 8.

Started by gmit2, August 07, 2014, 11:40:48 AM

Previous topic - Next topic

gmit2

I just did some work with an iPhone 5s which lists the iOS version as "8" (not 8.0).  Interesting, 8.0 is only in beta at this date.  The listed GPSDateStamp (EXIF tag 001D) is "2014:07:186" other metadata has the create date as "2014:07:04". 

Looks like the beta version of iOS 8.0 is not quite ready for a release. 

Anyone else notice this sort anomally?

Gordon
www.eSleuth.com

Phil Harvey

I haven't seen this, but have seen other similar problems, so it is not surprising.

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

AnTu

I just stumbled over the very same problem, now that I re-sort all my past 20 years of pictures.

On an iPhone 5S with iOS 8.0.2 the GPSDateTime show, as you described, as "YYYY:MM:DD hh:mm:ssZ", e.g. "2015:08:233 23:15:05.72Z". Using the -v3 option, you see the binary values as
  | | 13) GPSDateStamp = 2015:08:233
  | |     - Tag 0x001d (12 bytes, string[12] read as undef[12]):
  | |         0754: 32 30 31 35 3a 30 38 3a 32 33 33 00             [2015:08:233.]


It turns out that the day (DD) is given in day of the year. The 233rd day of the year 2015 was the 21st August, hence the correct date should have been "2015:08:21". Unfortunately I did not find an easy ExifTool option to convert it, setting the GPSDateTime also fails, but setting just the GPSDateStamp works!

I came up with a bash script that does the trick. Maybe somebody has a better idea, and I'd love to hear it.


DIRNAME="$( readlink -f "${1:-$(pwd)}" )"
IFS=,
exiftool -csv -m -q -r -if '$gpsdatetime' -GPSDateTime \"${DIRNAME%/}" | awk '
    BEGIN {
FS  = "[,: ]"
OFS = ","
}
        $4>31 {
                t=mktime($2" 1 "$4" "$5" "$6" "$7)
                print $1, strftime("%Y:%m:%d",t), strftime("%H:%M:",t)$7
            }
    ' | while read file date time
    do
        exiftool -m -overwrite_original_in_place -q -GPSDateStamp="$date" -GPSDateTime="$date $time" "$file"
    done

 

Phil Harvey

Smart.

GPSDateTime is a Composite tag based on GPSDateStamp and GPSTimeStamp, and isn't writable directly.

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