There are several
bug reports and attached discussions about how IMatch 5 displays, imports, exports and maps date and time information. And time zones.
Sadly this is a really
complex topic and many things and metadata features play a role.
But most users working with images taken with a digital camera or scanner are affected by this in some way.For the upcoming build I have improved and changed the way IMatch deals with date and time information to make it more flexible. I'll write up a short explanation here so you can comment on whether or not that is a good thing before I ship. Sorry for the typos.
Which Timestamps are there?We talk mostly about two timestamps here:
EXIF Date and Time created and
EXIF Date and Time Digitized. The old EXIF standard is a bit fuzzy about when to use what, but basically files created with a digital camera use either only Date and Time created, or set both tags to the same value. The digitized date can differ from the created date, e.g. when you use a scanner to scan a photography. You would fill in the date and time the photography was created in the "created" date and the date and time you scanned the photo into the "digitized" timestamp. Naturally, only the better scanner applications allow you to do that. But that's a different topic.
Different applications present these two timestamps under different names. ExifTool names these:
Date/Time Original (Exif::Main\36867\DateTimeOriginal) and
Create Date (Exif::Main\36868\CreateDate\0)
Important: EXIF does
not support time zone information. An EXIF timestamp like 2014:05:17 12:00:00 (today) carries no information about the time zone the 12:00:00 refers to.
MWG and MappingThe Metadata Working group publishes recommendations how to map from EXIF, IPTC and GPS data into XMP and vice-versa. IMatch implements these recommendations by default and utilizes a mix of ExifTool, ExifTool argument files created by Phil and internal logic to manage all that. The reason for all this mapping is to produce metadata of the best possible quality and application-interoperability.
XMP has two timestamps which map directly to the EXIF timestamps mentioned above. IMatch names these:
Date Subject Created (XMP::photoshop\DateCreated\DateCreated) and
Created Date (XMP::xmp\CreateDate\CreateDate\0)
You see these two time stamps in the Metadata Panel (Default layout).
XMP supports time zones. So a user can enter a timestamp like 2014:05:17 12:00:00+01:00 and we know that the 12:00:00 refers to the German Time zone (GMT+1). This allows to calculate the corresponding time in other areas of the world.
IPTC has two time stamps which are also mapped by MWG rules:
Date Created /
Time Created and
Digital Creation Date /
Digital Creation Time(IPTC uses separate tags for date and time values).
Important: IPTC
requires (not only supports) time zone information.
With me so far?
How IPTC and XMP times are created when importing a fileWhen IMatch creates a fresh XMP record when ingesting a file, it tries to produce the
most rich and complete XMP record. To do that it imports existing IPTC, EXIF and GPS data into the XMP record and applies the rules set by the Metadata Working Group. ExifTool also works it's magic and produces all kinds of useful information by stringing together pieces of metadata. This results, for example, in usable lens data and other things.
Now we come to the
tricky bit: Converting EXIF timestamps into IPTC and XMP. When IMatch runs the ExifTool arg files, they convert the EXIF timestamps into the IPTC and XMP timestamps. Since EXIF has no time zone information, the XMP timestamp also has no time zone. But since IPTC requires a time zone, ExifTool fills it with the local time zone. And this can be wrong. And is often.
Example:EXIF
2014:05:17 12:00:00 results in, after import and mapping:
XMP
2014:05:17 12:00:00 but
IPTC
2014:05:17 12:00:00+02:00 (ExifTool appends my local time zone, which is GMT +01:00 and an extra hour because of daylight saving time).
This is the first problem, because the image may have been taken in Calcutta (GMT +05:30) or in Tuvalu (GMT +12:00). There is no way to tell from looking at the EXIF timestamp, so applying the local time zone when mapping EXIF to IPTC can cause problems.
Mapping XMP <-> IPTCIMatch first maps EXIF to XMP and then IPTC (for technical and complicated reasons). This means that under certain conditions, first the EXIF timestamp is mapped to XMP, and that is then replaced by the IPTC timestamp.
And this can cause another problem in the XMP timestamp: when the IPTC timestamp was created by ExifTool, it has a time zone. When this timestamp is now mapped into XMP, the XMP timestamp also receives this time zone and thus also no longer matches the EXIF timestamp. And we have not even considered the possibility that, while EXIF has no time zone, a software may look for a GPS timestamp which may have a time zone. And if the GPS timestamp is 'close' to the EXIF timestamp it may apply the time zone used in the GPS stamp to fill in the time zone for IPTC and XMP.
>>If your head's spinning and you fee a bit woozy right now, that's normal. Carry on!SummaryThe mapping between EXIF and IPTC/XMP date and time information and the way ExifTool handles the mandatory time zones in IPTC can create problems and incorrect time zone information (and thus times). Especially when you write-back data and IMatch first writes XMP into IPTC and EXIF, and later reads the data back, mapping EXIF and IPTC back into XMP you may suddenly end up with unexpected time zone offsets in the XMP data.
>>Takes a deep breathTo get a grip on all that and to make IMatch behave more predictably, I introduced several changes in this area for the upcoming 5.0.168 build:
New Option: Keep existing XMP dataIMatch now has an option which allows you to control whether or not existing XMP data is retained when mapping EXIF/IPTC/GPS to XMP. If a file has no XMP record yet (embedded or sidecar), there is no change. If a file has already XMP (created by IMatch, LR or whatever software you use) and the new option is ON (default) IMatch only imports IPTC and EXIF and GPS if there is not already a corresponding XMP field. In short: Existing XMP is considered as "better" if the new option is on.
This change solves the following problem: IMatch writes XMP data and then synchronizes this data into IPTC. When the XMP timestamps have no time zone, ExifTool automatically adds the local time zone. So 12:00:00 (XMP) becomes 12:00:00+02:00 (IPTC). During the import, IMatch before replaced the XMP timestamp with the IPTC timestamp on import, forcing XMP to hold 12:00:00+02:00 afterwards (wrong).
The new option prevents that because since there is already an XMP timestamp, the IPTC timestamp is not imported again. So XMP keeps 12:00:00 (correct) even when the local time zone is added to the IPTC timestamp by ExifTool. This new option not only works for timestamps but also protects other XMP data.
New Options: Custom time zones for EXIF and IPTCThese options allow you to control which time zone to use for IPTC and EXIF. They work as follows:
If IMatch maps and XMP timestamp to IPTC, and the XMP timestamp has no time zone, IMatch checks if you have configured an IPTC time zone. If you did, IMatch uses that time zone instead of the local time zone (IMatch actually replaces timestamp created by ExifTool with a new timestamp in this case). If you leave that option empty, the default behavior of ExifTool kicks in (use local time zone).
The custom EXIF time zone setting allows you to tell IMatch which time zone to assume when importing EXIF into XMP. By default, IMatch does not assume a time zone so an EXIF timestamp of 12:00:00 will result in an XMP timestamp of 12:00:00. But if you know that your camera was set to UTC you can be more precise and set a custom time zone for EXIF as +00:00. And then the XMP timestamp becomes 12:00:00
+00:00 and clearly indicates that this means UTC.
If you set your camera (like most people do) to your local time, you can set the new option to your local time zone (mine: +02:00). When converting the EXIF timestamp delivered by your camera into XMP, IMatch then automatically produces 12:00:00+02:00 and this is precise because you know that this means 12 o' clock in Germany.
And when the XMP timestamp has a time zone, this time zone will also be used when ExifTool maps from XMP to IPTC, so this timestamp is then magically also correct.
>> If you have not fallen asleep yet, please comment.