Two questions:
(1) Does the composite tag -DateTimeOriginal include the tags -CreateDate and -GPSDateTime?
(2) I'm trying to apply the date formatting option
-d %m/%d/%Y
It seems to work fine for all dates reported except -CreateDate:
CreateDate: 0000:00:00 00:00:00
Is this because the date recorded is invalid (all zeroes)?. See attached output
Thanks!
Dan
Quote from: Dan Lewis on January 05, 2024, 11:05:59 AM(1) Does the composite tag -DateTimeOriginal include the tags -CreateDate and -GPSDateTime?
See the Composite tags page (https://exiftool.org/TagNames/Composite.html) to find out what tags are used to create a Composite tag. In this case, ignoring the ID3 tags which are for audio files,
Composite:DateTimeOriginal is created by either using the
DateTimeCreated tag (which itself is a Composite tag created by combining the
IPTC:DateCreated and
IPTC:TimeCreated tags) or by combining the
DateCreated and
TimeCreated tags.
Note that there is a subtle difference here.
DateTimeCreated is
only created by combining the IPTC tags, but
Composite:DateTimeOriginal can be created by
any tag with the names of
DateCreated/
TimeCreated. For example,
XMP-photoshop:DateCreated might be used.
Quote(2) I'm trying to apply the date formatting option
-d %m/%d/%Y
It seems to work fine for all dates reported except -CreateDate:
CreateDate: 0000:00:00 00:00:00
Is this because the date recorded is invalid (all zeroes)?. See attached output
The
DateTimeOriginal in that output is also all zeroes. But yes, the invalid time stamp would be the reason. The subroutine that exiftool uses to convert date/times (called
PrintConv) wouldn't be able to convert a 0 month or 0 day. You can see the same result using any invalid value. For example, setting the
EXIF:DateTimeOriginal to an invalid value (using the
-n (
--printConv) option (https://exiftool.org/exiftool_pod.html#n---printConv)) results in no change to the value, while
XMP:DateTimeOriginal, which has a valid time stamp is affected by the
-d (
-dateFormat) option (https://exiftool.org/exiftool_pod.html#d-FMT--dateFormat).
C:\>exiftool -P -overwrite_original -all= -n -EXIF:DateTimeOriginal="12 Monkeys" -XMP:DateTimeOriginal="2024:01:05 12:00:00" y:\!temp\Test4.jpg
1 image files updated
C:\>exiftool -G1 -a -s -d %m/%d/%Y -DateTimeOriginal y:\!temp\Test4.jpg
[ExifIFD] DateTimeOriginal : 12 Monkeys
[XMP-exif] DateTimeOriginal : 01/05/2024
Thanks for the fast response!
Based on your answer to question #1, I would infer that Composite:DateTimeOriginal does *NOT* include either -CreateDate or -GPSDateTime (since neither are mentioned in your response).
However Composite:DateTimeOriginal always seems to be reported whenever -CreateDate is found. Am I missing something here? E.g., is -CreateDate an alias for IPTC:DateCreated?
And can you please confirm that -GPSDateTime is *NOT* included in Composite:DateTimeOriginal?
Best,
Dan
Quote from: Dan Lewis on January 05, 2024, 12:25:09 PMThanks for the fast response!
Based on your answer to question #1, I would infer that Composite:DateTimeOriginal does *NOT* include either -CreateDate or -GPSDateTime (since neither are mentioned in your response).
As I said
QuoteComposite:DateTimeOriginal is created by either using the DateTimeCreated tag (which itself is a Composite tag created by combining the IPTC:DateCreated and IPTC:TimeCreated tags) or by combining the DateCreated and TimeCreated tags.
QuoteHowever Composite:DateTimeOriginal always seems to be reported whenever -CreateDate is found. Am I missing something here? E.g., is -CreateDate an alias for IPTC:DateCreated?
No.
CreateDate is the name of the tag. It can appear in the EXIF and XMP groups. In images directly from a camera, three tags should automatically be created,
EXIF:CreateDate,
EXIF:DateTimeOriginal, and
EXIF:ModifyDate. It would be very unlikely that an unedited photo would only have
DateTimeOriginal and not
CreateDateAlso, tags in the IPTC group will not appear by default in a photo. They have to be added by some program, such as LightRoom.
QuoteAnd can you please confirm that -GPSDateTime is *NOT* included in Composite:DateTimeOriginal?
It is not, see above.
There are two possible locations for
GPSDateTime. It will either be a Composite tag, made by combining the
GPS:GPSDateStamp and
GPS:GPSTimeStamp tags (which are EXIF tags). This value should always be set to UTC.
Or it could be
XMP-exif:GPSDateTime. This tag does not have to be set to UTC but should have a time zone if it is not UTC. Also, it is unlikely to appear in an unedited image.