How IMatch uses Date and Time Information

For images taken with a digital camera or smart phone, the embedded EXIF metadata usually contains usable date and time information. For videos and other file formats, determining a usable created timestamp can be a lot trickier.
This topic explains how IMatch extracts date and time information from files, how it deals with time zones and how you can display and use date and time in IMatch.

See Metadata for Beginners for a detailed overview of how IMatch works with metadata.

What Is File.DateTime?

File.DateTime is a global timestamp IMatch maintains for all files you manage in your database, independent of the file format and metadata availability.

Image files, video files, MP3 files, PDF files, Office documents etc. all use different mechanisms to record a creation timestamp (some don't at all!).
IMatch determines the best timestamp available for a file and then sets the global File.DateTime timestamp for that file from its findings.

Having a consistent global timestamp that works for all file formats is important. File.DateTime is used for a variety of purposes:

If a file has no XMP data when it is imported, IMatch sets the important Date Subject Created and Create Date timestamp tags from File.DateTime value it has determined for the file.

Usually this works just fine and 'behind the curtain'.
But sometimes it doesn't, and then you need to know where this timestamp comes from and how to change it. This is explained in the remainder of this topic.

Time is complicated. But don't worry.

A Quick Time Zone Refresher

Time zones range from -12:00 to +14:00 hours. London (GBR) is at UTC +00:00, Berlin (DEU) is at +01:00, Helsinki (FIN) is at +02:00, Boston (USA) is at -05:00, Seattle (USA) is at -08:00 and Sydney (AUS) is at +11:00 (assuming DST is active).

Times are expressed relative to UTC (as a time zone offset), using +, - or Z to indicate the number of hours and minutes distance from UTC. UTC is sometimes referred to as GMT (Greenwich Mean Time). Time zone offsets are usually a whole number of hours, but there are some countries which have offsets with additional 30 or 45 minutes (India, South Australia, Nepal).

Examples:

The timestamp 14:00:00+01:00 means that it is 14:00:00 in a time zone one hour ahead of UTC (German time zone).
To get the UTC time from this timestamp, we subtract one hour from 14:00:00, resulting in 13:00:00+00:00 or 13:00:00Z. The letter Z means UTC.
It's 18:15:00 in London when it's 19:15:00 in Berlin.

The timestamp 11:27:55-08:00 means that it is 11:27:55 in a time zone eight hours before UTC (Seattle time zone).
To get the UTC time from this timestamp, we add 8 hours to 11:27:55, resulting in 19:27:55+00:00 or 19:27:55Z.

An image with a timestamp like 08:10:42 without a time zone offset could mean anything.
The photo may have been taken in your local time zone or in the Seattle time zone. Maybe the camera was set to UTC? Impossible to tell without additional information.

UTC and Local Time

IMatch records File.DateTime in UTC (Universal Coordinated Time) internally.

IMatch versions prior 2023 recorded File.DateTime in local time.
While migrating of older databases, IMatch 2023 and later automatically convert existing File.DateTime timestamps into UTC.


Time Zone Offsets

When IMatch can determine a time zone offset from metadata tags contained in your files, it uses this offset to calculate File.DateTime in UTC. If no time zone offset can be identified, IMatch applies a user-defined time zone offset.
These are two most common scenarios when it comes to date and time with digital images.

Calculating File.DateTime with or without a metadata time zone offset.

IMatch remembers the time zone offset used when calculating File.DateTime and can later provide the timestamp in UTC, in your local time zone and in the original time zone.

In the example above this would be:

Most D-SLR's and smart phone provide features to set the internal clock and time zone.
If you forget to set the clock or the configured time zone does not match the time zone of the place you were taking photos, you can use the IMatch Time Wiz app to correct the date, time and time zone metadata.


IMatch uses the EXIF::OffsetTimeOriginal and EXIF::OffsetTimeDigitized metadata tags if available to determine the time zone offset to use. It uses EXIF::TimeZoneOffset if none of the other timestamps is available. Depending on the file format, additional time zone tags may be considered. For video files, IMatch looks for the QuickTime::TimeZone tag, for example.

If IMatch produces File.DateTime from legacy IPTC data in the image (which overrides as human-made metadata machine-generated data like EXIF), it uses the time zone offset recorded in the IPTC time, if available.

When you only take photos in your country, you set the time zone offset once in your camera and you are done. Don't forget to regularly check the clock in the camera, since these clocks often drift after a couple of weeks.

If you travel and take photos all over the world, keep the time zone offset in your camera in sync with the country you're in. This ensures that the camera and IMatch get the date and time right. If you make a mistake, use the Time Wiz app to correct or add time zone metadata.

Another approach is to always keep the camera set to UTC and then adjust the timestamp for outputs as needed.

UTC, Local Time, Original Time

As said above, IMatch stores File.DateTime in UTC. This is the most robust format. IMatch also remembers the time zone offset applied at the time File.DateTime was calculated. Either a time zone offset available in metadata or a user-defined time zone offset.

This allows IMatch to calculate 3 different timestamps based on File.DateTime:

Original

Date and time in the original time zone as found in the file or as configured by the user.
This is the date and time the image was taken in the time zone of the place where it was taken.
IMatch uses this as the default, e.g. for the Date & Time File Window Layout attribute or the {File.DateTime} variable.

UTC

Universal date and time.

Local

Date and time converted into the local time zone as configured in Windows, based on the UTC value.
The result of this will shift when Daylight Saving Time becomes active/inactive or you change the Windows time zone setting.

Example

An image has the EXIF timestamp 11:50.22 and EXIF reports a time zone offset of +08:00 hours (Perth, Australia).
File.DateTime in UTC is 03:50:22Z,
File.DateTime.Original is 11:50:22+08:00
File.DateTime.Local would show as 11:50.22 in Perth but as 04:50:22 in Germany (UTC+01:00), for example.

In this screen shot the File Window layout on the left uses the Date & Time Local attribute for displaying the file time (screen shot from a computer using the German +01:00 time zone). On the right it uses the default Date & Time attribute, which outputs the Original date and time:

File Window Layouts support Date & Time attributes which include the time zone offset. If you work with images taken in various time zones, you might want to use one of these attributes variants:

Daylight Saving Time (DST)

IMatch uses date & time conversion routines which rely on a time zone database in order to tell if DST was active (locally) for a specific date. The results of the local time conversion hence take DST into account, shifting +1/ one hour, depending on the date portion of the timestamp and the date.


How You Set or Change Date and Time for Files

The Metadata Panel (in the Default layout) displays the two standard timestamps Create Date and Date Subject Created.

The Date Subject Created is the more important timestamp and when you set or change it, IMatch updates File.DateTime from the new value automatically. If a time zone offset is available in Date Subject Created, IMatch applies it when calculating File.DateTime in UTC.

Date Subject Created specifies the date and time the photo was created. This is not necessarily the same date and time the image file was created.
Consider a photo taken on June 4., 1950 which was later scanned and digitized.
The Date Subject Created should be set to June 4., 1950 and the Create Date (sometimes called digitized date) should be set to the date and time the digital image was created.

If you take photos with a digital camera or smart phone, both timestamps are usually identical.

Time zone Offsets in the Metadata Panel

The Metadata Panel formats date & time values using the date & time format set in Windows and hides the time zone offset if it matches your local time zone. This makes date & time values easy to read.
If you don't want this, you can disable it via the menu in the Metadata Panel.

When you edit a date & time tag, the value is formatted in the standard ISO format and the time zone and 1/100 seconds are displayed when available.

The following screen shot makes this more clear. We assume that the local time zone is set to UTC+02:00 (or UTC+01:00 with DST active).

The first file has a time zone offset of +01:00 and the Metadata Panel displays the offset to make this clear.
The second file has a time zone offset of 02:00, which matches the local time zone. The offset is hidden. After clicking into the value, the value is displayed in the default ISO format and time zone offset is included, which is important for editing:

If the current time zone offset would be UTC+01:00, no time zone offset would be displayed for the first file, but for the second file.

File.DateTime Mapping Mode (User-defined Time Zone Offsets)

When IMatch cannot determine a time zone offset when ingesting a file, it applies the user-defined time zone offset set in Edit > Preferences > Metadata 2: File.DateTime Mapping Mode. There are 7 Mapping Modes available.

The default mapping mode 2 works great for almost all use-cases.

Updating File.DateTime After Changing the Mapping Mode

Changing the mapping more affects files added or updated in the future. To recalculate File.DateTime for files already in the database:

IMatch recalculates the File.DateTime for all selected files, applying the current mapping mode.

How IMatch fills File.DateTime During Import

How IMatch determines the best timestamp to use when importing a file depends on the file format and the metadata available in the file.

From XMP Metadata

IMatch first looks for suitable timestamps in the XMP record (previously existing or created by ExifTool) for images and other formats during import. XMP is considered as the superior metadata format and usually more complete and recent than native metadata. It first checks for XMP::photoshop\DateCreated\DateCreated tag (named Date Subject Created in the Metadata Panel) and then for XMP::xmp\CreateDate\CreateDate (named Create Date in the Metadata Panel).

ExifTool automatically detects time zone offsets in EXIF / XMP metadata and adds the corresponding offset to the XMP timestamps delivered to IMatch. IMatch applies the time zone offset when calculating File.DateTime.

From EXIF Metadata

If file has no XMP but a valid EXIF record, IMatch uses one of the three optional EXIF timestamps, in the following order:

  1. Date and Time Original (Exif::Main\36867\DateTimeOriginal)
  2. Date and Time Created (Exif::Main\36868\CreateDate).
    This tag is sometimes also named Date and Time Digitized
  3. Date and Time (Exif::Main\306\ModifyDate)

Note that none of these timestamps may exist in the EXIF record and that sometimes the information is invalid or incomplete.

The EXIF standard defines optional separate time zone offsets for Date and Time Original and Date and Time Created: Exif::Main\36881\OffsetTimeOriginal and Exif::Main\36882\OffsetTimeDigitized, respectively.
If available, IMatch uses these when calculating File.DateTime.

Most older image files (and even many new ones) don't contain an EXIF time zone offset. Either it is not supported or the user has not entered a time zone offset in the camera. Sometimes there is only one of the offsets. In that case, IMatch applies a user-defined time zone offset according to the active mapping mode.

You can use the powerful Time Wiz app integrated in IMatch to add missing time zone information, shift and correct timestamps and much more.

From Other Formats

If the file is a PDF file, IMatch uses the PDF Create Date and Time, if available.

If the file is an Office document or a document containing FlashPix information, IMatch uses the Create Date and Time when available.

If the file is an Open Office/Libre Office document, IMatch uses the OOXML Create Date and Time if available.

If the file is a QuickTime File (MOV, MP4) IMatch analyzes the various QuickTime date and time stamps. It looks at CreateDate, CreationDate, UserContentCreationDate, UserDateTimeOriginal and about a dozen other timestamps which may appear in a QuickTime file or stream. The first valid date and time value found is used.

If the file has H264 video metadata, IMatch prefers the H264 original date and time value, unless XMP data is also available in the video.

Some Apple products and services produce CreateDate and CreationDate timestamps with different values. This makes it impossible to tell which of the timestamp is correct. IMatch by default prefers CreateDate.
You can override this under Edit > Preferences > Metadata 2; QuickTime. Enable the option to Favor CreationDate when this is 'more correct' for your movie files. See this topic for more info.


The 'Created / Last Modified' in the File System Fallback

If still no usable date and time was found, IMatch uses the the older of the created and last modified timestamp as reported by the Windows file system. IMatch uses the older timestamp because when you copy a file between disks, the created timestamp can be newer than the last modified timestamp! This is just how Windows handles this.

IMatch versions before 2021 always uses the last modified timestamp for historical reasons. Together with the user community we made the decision to change this to the behavior explained above.

When the option to apply the time zone is enabled in Edit > Preferences > Metadata 2 (default), IMatch sets the XMP timestamps with the local time zone, to make it clear that the timestamp has been set based on local time (from the file system) timestamp.

Example

A file without EXIF data or other suitable timestamps is added to the database. IMatch uses the date created as reported by the Windows file system to set the File.DateTime to 2021:06:03 12:11:55. IMatch also updates the Create Date and Date Subject Created XMP tags from this data. Assuming your local time zone is UTC +05:00, the resulting XMP timestamps are 2021:06:03 12:11:55+05:00.

Pending Write-Back

When IMatch sets one or both XMP timestamps from a file system date, it marks the tag as modified and the file is set to the pending write-back state. This ensures that the two timestamps are written back when you write-back the file, and so become permanent. If IMatch would not do this, the two timestamps could be reset back to the new file system date after write-back (in cases where the last modified on disk timestamp must be used).

Since IMatch 2021 the files are only set as pending when IMatch had to fall-back to use a file-system provided date. If IMatch derived the data from metadata, the file is not marked as pending (unless other metadata was creating during indexing, of course).

You can disable this behavior (not recommended!) under Edit > Preferences > Metadata 2.

XMP Timestamps

If a file has no XMP metadata yet (or the timestamps are empty), IMatch fills:

from the File.DateTime determined following the rules explained above.

When IMatch fills these timestamps, it by default marks the file as pending for write-back.
When you write-back the file, IMatch adds/updates the existing EXIF/IPTC timestamps from the XMP timestamps.

You can disable this behavior under Edit > Preferences > Metadata 2, if you don't want the file to be marked as pending write-back. This is not recommended.

Positioning Files on the Timeline

The position of a file on the timeline is controlled by the global File.DateTime.

If you change the value of the XMP::photoshop\DateCreated\DateCreated tag (named Date Subject Created in the Metadata Panel), IMatch updates File.DateTime and this also changes the position of the file on the timeline.

Events

Unless you pin an event, its position in the Event View is determined from the File.DateTime timestamp of the files in the event.

Fixing Missing or Wrong Timestamps

Use the Metadata Panel to set a value for the XMP::photoshop\DateCreated\DateCreated tag (named Date Subject Created in the Metadata Panel). Changing this tag also changes File.DateTime.

After you write back, the new date and time is accessible for other applications as well.

The Time Wiz App

The Time Wiz App makes it very easy to set, modify, correct and shift metadata timestamps. It works for individual files but can also be used to modify hundreds of files at once. Very handy when the camera clock in your camera was off again, or you forgot to update the camera time zone when taking pictures in other countries.

Uncertain Dates

If you don't know the precise date an image was taken, see Working with Uncertain Dates for some tips.