[Originally posted by johnzeman on 2008-02-02 01:32:59-08]
Hi Phil,
I've noticed lately that going back to around last mid December any time I use -TagsFromFile to copy all metadata from DNGs to JPGs, there are one too many characters at the end of the EXIF last modified timestamp of the JPGs. The seconds always have a Z appended at the end.
I'm using the Windows executable version 7.13.
Many thanks for all you do!
John
[Originally posted by bogdan on 2008-02-02 08:05:02-08]
There can be at least two kind of DateTimes inside metadata: EXIF DateTime tags and XMP DateTime tags. DateTime tags inside XMP have "TimeZone" format. If you see:
"yyyy:mm:dd hh:mm:ssZ" -this means there's no TimeZone offset.
In many cases you can see (for example):
"yyyy:mm:dd hh:mm:ss+01:00"
-meaning: DateTime as set on your camera, plus one hour for TimeZone (as set on your PC, when DNG was created).
This can be very confusing...as Adobe proved in Lightroom -DateTimes inside their Library (database) are totaly unusable.
Hope this was of some help.
Bogdan
[Originally posted by johnzeman on 2008-02-02 13:25:11-08]Thanks for the response Bogdan. I am seeing a Z appended to the end of the timestamp however this is the EXIF last modified date/time tags which I didn't think supported time zone information. When I look at the xmp last modified timestamps I do see the timezone trailing the rest of the timestamp just as you say.
This started happening in mid December which is also when the latest Lightroom was released. So I'm not so sure I'm in the right forum here, but I need to start somewhere.

Just to be clear on my workflow:
1. I shoot Canon raw CR2
2. In Lightroom I cull and export the better images as DNGs without any metadata.
3. Then I use ExifTool -TagsFromFile To copy all tags from the CR2 originals to the appropriate DNGs.
4. The DNGs are further rated/culled/optimized and finally exported as JPGs, again without any metadata.
5. And last I use ExifTool -TagsFromFile To copy all tags from the DNGs to the appropriate JPGs and that is when the Z is appended to the end of the EXIF last modified timestamp of the JPGs.
Thanks again.
John
[Originally posted by exiftool on 2008-02-02 13:40:34-08]Bogdan is correct. The XMP specification stores all date/time strings
in ISO 8601 format, which requires a timezone indicator to be specified.
This is different than the EXIF specification which has no timezone.
As of ExifTool version 7.04 (released Dec. 3, 2007), the date/time values
are coerced into proper format when writing unless the
-n option
is used. If a timezone is required but not specified, exiftool adds one.
Up until now, exiftool has added "Z" to satisfy this requirement, but
upon reading the XMP specification again, it suggests adding the local
timezone if no timezone information is specified (ie. "-05:00" would
be added instead of "Z" if your local timezone is EST). I will make this
change and exiftool 7.15 will add the local timezone instead of "Z"
if the timezone information is missing.
If you the timezone where the pictures are taken is different than
the local timezone, you can specify a timezone when copying information
like this:
exiftool "-xmp:datetimeoriginal<${exif:datetimeoriginal}-05:00" image.jpg
- Phil
[Originally posted by exiftool on 2008-02-02 13:56:16-08]
I just realized that you can not avoid the XMP date/time parsing
with the -n option as I implied in my previous post.
This does work for EXIF, but the XMP formatting is currently
a bit more restrictive and doesn't allow invalid date/time values
like this to be written.
- Phil
[Originally posted by johnzeman on 2008-02-02 18:24:45-08]
Thanks Phil I think I understand the timezone issues with xmp, but why is timezone information in EXIF at all?
I expect you're right but I also can't help but wonder why it's only in the EXIF last modified tag and not the EXIF date/time created or EXIF digitized tags.
John
[Originally posted by exiftool on 2008-02-03 12:08:00-08]
Hi John,
There is no EXIF "last modified" tag. Are you talking about
EXIF:ModifyDate? Did you use -G1 to be sure
the information is in the EXIF? (Also you may want to
use -s to get the exact tag name.) I was assuming
that it was XMP because the EXIF doesn't contain timezones, and in
fact exiftool will strip them off if the exist when writing unless
the -n option is used.
- Phil
[Originally posted by johnzeman on 2008-02-03 14:56:47-08]Thanks Phil, and I apologize for pestering you like this but I do think there is something wrong. Yes, I did mean the EXIF:ModifyDate, below is an extract from when I ran the following command:
exiftool -G1 -s "%IMG%">C:\temp.txt
(where %IMG% is a test image).
[IFD0] ModifyDate : 2008:01:27 13:50:11Z
Note the trailing Z. This happens if I only use the -TagsFromFile option. If I also add -EXIF:All then the trailing Z is not appended.
If I use an older version of ExifTool, for example 6.96, everything is ok. This only started in mid December and only seems to happen when I'm copying from DNGs.
John
[Originally posted by bogdan on 2008-02-03 15:27:41-08]
Hi John,
Thanks for additional explanation -now I can confirm, it happens here too. In my case, instead of trailing "Z", I get trailing "+01:00".
That is, this happens only if source file is DNG -is this because DNG also has ModifyDate inside XMP?
Bogdan
[Originally posted by exiftool on 2008-02-04 12:04:08-08]
I'm open to suggestions, but currently exiftool does not strip the timezone
from the date/time string when an XMP date/time is copied to an EXIF
date/time. I know this goes against the EXIF specification, but to be
truthful the EXIF specification should have included the timezone
information in the first place.
So this will happen if you copy the XMP:ModifyDate to EXIF:ModifyDate.
If this is not what you want, you can copy the tags to the same
groups by adding -all:all after -TagsFromFile.
(Note that if you do this you should also add -xmp:all if
you want all XMP date/times to be copied due to a bug which
has just been discovered, but this will be fixed in exiftool 7.15).
- Phil
[Originally posted by bogdan on 2008-02-04 16:49:45-08]
Hi Phil,
Could be, I mis something, but I would expect, that (for DNG, which contain both, exif and xmp):
exiftool -tagsfromfile src.dng dst.mie
and
exiftool -tagsfromfile src.dng -all:all dst.mie
-would give identical resulting mie file.
Right now, if -tagsfromfile is used without "-all:all", resulting EXIF:ModifyDate has trailing TimeZone (but resulting EXIF:DateTimeOriginal and EXIF:CreateDate doesn't have it).
And if I include "-all:all", then none of resulting EXIF DateTimes has trailing TimeZone.
I'm thinking... As far I have tested, traling TimeZone appears only if:
1. "-tagsfromfile" is used,
2. it's without additional (-all:all) option,
3. it appears only for EXIF:ModifyDate.
-in all other cases (AFAIK), there's no trailing TimeZone result for any of EXIF DateTimes.
This would suggest to strip TimeZone for EXIF:ModifyDate in this case too -especially if source EXIF DateTimes doesn't contain TimeZone trailings. Btw. somehow I have a feeling that resulting EXIF:ModifyDate is copied from XMP:ModifyDate, while other two DateTime values are copied (as expected) from EXIF -that's the only explanation for "from where is trailing TimeZone data comming?".
It's about consistency: when copying metadata, either none of EXIF DateTimes has TimeZone trailing (which I prefer), or all have it (but that's not what most users would expect, though). Even better: resulting EXIF DateTimes should have the same format as source file (when using "-tagsfromfile").
Anyway, as it is, it can be confusing... I'm not saying what you should do -I'm only thinking loud :-)
Greetings,
Bogdan
[Originally posted by exiftool on 2008-02-04 18:13:37-08]
MIE format supports information in other native formats, so
using -all:all is significant, and will keep the information
in its original location (format). Without this, information will be
preferentially written to EXIF, IPTC and XMP in that order. This is
true for many other file types as well, since there are other file
types that also support these types of information.
By this logic, copying from XMP:DateTimeOriginal without specifying
a group will write by EXIF:DateTimeOriginal and you will get a timezone
specifier in your EXIF date/time string.
The tags are copied in the order they are encountered, so if a file
contains both EXIF and XMP information and both contain a tag with
the same name, then it is the second tag that is written.
About removing or not removing the timezone when writing to EXIF:
The current behaviour is clearly inconsistent, so unless
anyone objects I will make a change in exiftool 7.15 to use the
following logic:
1) If no timezone exists when writing an XMP date/time value, the
local timezone will be added unless the -n option is used.
2) If a timezone exists when writing EXIF information, it will be stripped
off unless the -n option is used.
- Phil
[Originally posted by bogdan on 2008-02-04 19:41:07-08]
Thank you for clarifying some things... and I hope you don't find I'm "pushing" too much :-)
As far I can tell, using "-all:all" behaves as expected and I always specify what to read/write when using ExifTool (despite missing two DateTimes, which will be corrected in v7.15, you said).
It is just how EXIF DateTimes are written (using -tagsfromfile) when tag/group isn't specified: EXIF:ModifyDate has TimeZone, while EXIF:DateTimeOriginal and EXIF:CreateDate haven't. But, speaking for me (as I always specify Group/TagName), it really doesn't bother me.
I realy don't know if there's something "needed" to be changed. Despite above "issue", ExifTool (at least how I use it) always does as expected:
1. EXIF DateTimes written or copied from somewhere, never have TimeZone trailers,
2. XMP DateTimes written or copied from somewhere, always have TimeZone (or "Z" if there's none)
IMO, that's how it should be. And I see "-n" option as a feature when writing DateTimes -to override default DateTime format.
So, as long ExifTool does as said above (1. and 2.), I wouldn't change nothing in this regard.
Thank you for patience,
Bogdan
[Originally posted by exiftool on 2008-02-04 20:02:29-08]
Hi Bogdan,
Good. It sounds like we are in agreement.
If all goes well, I should be able to release the new version within a
day or two.
- Phil
[Originally posted by johnzeman on 2008-02-06 18:31:59-08]
Hi Phil,
I just wanted to report the latest build seems to have cured my EXIF problems from before. Many thanks!
John
[Originally posted by mferreira on 2008-02-07 17:45:43-08]Dear all,
I'm using ExifTool 7.15 and I'm still getting date times without an associated TimeZone.
Here's the dates I'm getting for a tiff file:
File Modification Date/Time : 2007:12:06 11:56:40
Modify Date : 2007:09:28 10:33:26+01:00
Metadata Date : 2007:12:06 11:56:40+00:00
Date/Time Digitized : 2003:11:25 12:59:58Z
Date/Time Original : 2003:11:25 12:59:58
Create Date : 2003:11:25 12:59:58
Profile Date Time : 1998:02:09 06:49:00
[Originally posted by exiftool on 2008-02-07 17:58:52-08]
Yes. When extracting information, you will see what was stored
in the image. Typically only XMP tags will have timezone information
(use the -G1 option to see where the information came from).
We were talking about what happens when you write new information, in
which case the timezone is added automatically to XMP date/time values
unless already specified.
- Phil