I'm rather confused about the best way to handle timestamps in JPGs for UTC. I have photos that need to be shared with people in different timezones. We have to timestamp them in UTC (Zulu) time, so that they are standardized.
Problem One – if my photos are timestamped in UTC, when I run -geotag, exiftool assumes the photos are in local time, looks the system time and, erroneously applies an offset.
I could put in an offset with -geotime to take out the offset that exiftool is adding, but, not only is that a kludge, I'd have to have two (or more) scripts, as the offset would change depending on whether its daylight savings time, or if I've moved the computer to another timezone (or sent the picture to another computer/user in another timezone).
I understand that the EXIF:TimeZoneOffset (0x882a) tag is a later addition to the EXIF specification. Could exiftools start to use that tag ? – I'd like to just set a flag (in the gui) or just write 0 to the TimeZoneOffset, and have -geotag not apply PC system clock 'correction' when it sees that.
If that doesn't seem reasonable, perhaps the XMP data/time values could be used... whatever works.
(There's also a Timezone tag which is set to 00:00 – seems that's not used by -geotag either.)
I would imagine this is a fairly common problem.
PS. The photos have all time tag fields and system timstamps set to the same time (UTC). Running on Linux mint with Exiftool 8.60.
Second problem. As a workaround, I've unsuccessfully tried to force a UTC time with
$exiftool -v3 -geotag=GPS_20150519_001335.log "-Geotime<${DateTimeOriginal}-00:00" DSC_0033.JPG
Loaded 1409 points from GPS track log file 'GPS_20150519_001335.log'
GPS track start: 2015:05:19 00:13:35 UTC
GPS track end: 2015:05:19 02:10:53 UTC
Writing File:Geotag
======== DSC_0033.JPG
Setting new values from DSC_0033.JPG
Warning: No writable tags found - DSC_0033.JPG
Nothing changed in DSC_0033.JPG
0 image files updated
1 image files unchanged
What does "no writeable tags found" mean? The DateTimeOriginal is readable:
exiftool -DateTimeOriginal DSC_0033.JPG
Date/Time Original : 2015:05:19 01:31:06
I even tried
exiftool -v3 -geotag=GPS_20150519_001335.log -TagsFromFile DSC_0033.JPG "-Geotime<${Createdate}" DSC_0033.JPG
With the same result! After 5 hrs of this I'm really frustrated. Any help will be much appreciated.
While I can't be of too much help, the geotag stuff has always confused me (so glad that geosetter exists), but you mention that you're using Linux. In that case I believe you need to be using single quotes instead of double quotes. Double quotes are what is needed under Windows.
Quote from: vj777 on May 24, 2015, 02:19:39 AM
I understand that the EXIF:TimeZoneOffset (0x882a) tag is a later addition to the EXIF specification. Could exiftools start to use that tag ?
No. It is not part of the EXIF standard, and is not commonly used.
QuoteIf that doesn't seem reasonable, perhaps the XMP data/time values could be used...
You may set the GeoTime from an XMP date/time tag if you wish. This would solve the time zone problem.
QuoteSecond problem. As a workaround, I've unsuccessfully tried to force a UTC time with
$exiftool -v3 -geotag=GPS_20150519_001335.log "-Geotime<${DateTimeOriginal}-00:00" DSC_0033.JPG
This is the solution that I would recommend, however the quotes are wrong as StarGeek mentioned. With double quotes, the shell will interpolate DateTimeOriginal as a shell variable (which will likely be empty). You must be using a Bourne shell, because a C shell will give you this warning, which may have helped if you could realize that the warning is from the shell:
DateTimeOriginal: Undefined variable.
- Phil
I put an xmp:datetimeoriginal with the time zone in all my photographs now. I use my own script to match my gps files against the photos so I can refer to xmp.
(As an aside, I seem to remember, or maybe I've misremembered, but just as I'd done this, Phil announced that he was putting gps support into exiftool)
Thanks very much everyone. Yes, the single quote fixed the 2nd problem. Much appreciated.
I'm surpised exiftool assumes photos are timestamped in the local timezone. The Timezone tag isn't identified http://www.exiftool.org/TagNames/EXIF.html (http://www.exiftool.org/TagNames/EXIF.html) as part of the EXIF info. Is this part of another tag? I noticed Exiftool writes to Timezoneoffset when geotagging.
Does 'Timezone' indicate which timezone the photo is taken in (or is it supposed to)? Looking at a few photos it seems to generally be zero.
Thanks for the suggestions.
Quote from: vj777 on May 25, 2015, 12:15:27 AM
I'm surpised exiftool assumes photos are timestamped in the local timezone.
I'm surprised that you're surprised. I can't see any other reasonable assumption to make.
QuoteI noticed Exiftool writes to Timezoneoffset when geotagging.
No it doesn't.
- Phil
Quoteor if I've moved the computer to another timezone (or sent the picture to another computer/user in another timezone).
On linux, you can change the time zone just for the command line window you are working in.
Type
TZ='UTC0'; export TZbefore you start working in that window.
Quote from: Phil Harvey on May 25, 2015, 07:07:54 AM
I'm surprised that you're surprised. I can't see any other reasonable assumption to make.
I suppose I just don't understand the use (or not) of the 'Timezone' tag. If it's not being written to by cameras in general, then I see the dilemma.
QuoteI noticed Exiftool writes to Timezoneoffset when geotagging.
No it doesn't.
Quite right - just tried it again --I don't know how it was getting changed.
Thanks Phil.
Quote from: Alan Clifford on May 25, 2015, 12:52:43 PM
On linux, you can change the time zone just for the command line window you are working in.
Type
TZ='UTC0'; export TZ
before you start working in that window.
Brilliant! That will save me having to calculate local time offset.
Thanks Alan.
Quote from: vj777 on May 25, 2015, 09:24:47 PM
Quote from: Alan Clifford on May 25, 2015, 12:52:43 PM
On linux, you can change the time zone just for the command line window you are working in.
Type
TZ='UTC0'; export TZ
before you start working in that window.
Brilliant! That will save me having to calculate local time offset.
Yes, thanks Alan. But I don't see how this is any easier than specifying the time zone when setting Geotime:
'-Geotime<${DateTimeOriginal}-00:00' or just
'-Geotime<${DateTimeOriginal}Z' if the camera times are in UTC.
- Phil