still struggling with the different date time tags

Started by orichardt, October 30, 2024, 04:46:47 PM

Previous topic - Next topic

orichardt

I know this is a subject that comes up a lot of times, but I have a hard time to get to grips with it when looking at different pictures and the different time tags, so I will try with a very hands-on example, hopefully get a answer I can digest:
I take a picture with my iPhone, October 14th 2024 in Germany, TZ +2, at 06:07:03 local time

From my understanding the following should be the result in the tags:

1. Exif:DateTimeOriginal = 2024:10:14 04:07:03 (as this is UTC time)
2. Exif:OffsetTimeOriginal = +2 (as this is UTC+2, Germany TZ)
Together these 2 fields give a local time of 06:07:03 - the local time picture was taken
------------------
3. XMP-photoshop:DateCreated would/should show: 06:07:03, as it displays the local time of time the picture was taken
4. XMP:DateTimeOriginal would/should show:      04:07:03, as this displays the UTC time the picture was taken
-------------------
5. Exif:CreateDate: would/should show:          04:07:03, as this displays the UTC time the picture was digitized, and as this is a digital "camera" Exif:DateTimeOriginal=Exif:CreateDate
6. XMP:DateCreated: would/should show:          04:07:03, as this is the XMP equivalent of the Exif:CreateDate (5)

Q1: do I go wrong anywhere here, or is my understanding right?
Q2: When I look at the tags in pictures taken with my iPhone 13, iOS 17, both as .HEIC and as xnConvert converted to JPG files, then the Exif:DateTimeOriginal = 2024:10:14 06:07:03 - is this just because of Apples interpretation of the standards or is it because I'm wrong in my assumption of (1) above?

Apologies for the long-winded description, hopefully the answer can be equally short :-)

StarGeek

Quote from: orichardt on October 30, 2024, 04:46:47 PMFrom my understanding the following should be the result in the tags:

1. Exif:DateTimeOriginal = 2024:10:14 04:07:03 (as this is UTC time)

No. All the EXIF time stamps except for the GPS ones are local time where the image was taken.
Quote2. Exif:OffsetTimeOriginal = +2 (as this is UTC+2, Germany TZ)
Together these 2 fields give a local time of 06:07:03 - the local time picture was taken

The OffsetTimeOriginal tag only holds the time zone. It is not used in any calculation.

So for your date/time, you would see this ("MyAllDates" is a short cut tag of mine that shows the AllDates and their corresponding OffsetTime* and Subsec* tags and isn't a default exiftool tag)

C:\>exiftool -G1 -a -s -myalldates y:\!temp\Test4.jpg
[ExifIFD]       DateTimeOriginal                : 2024:10:14 06:07:03
[ExifIFD]       CreateDate                      : 2024:10:14 06:07:03
[IFD0]          ModifyDate                      : 2024:10:14 06:07:03
[ExifIFD]       OffsetTimeDigitized             : +02:00
[ExifIFD]       OffsetTimeOriginal              : +02:00
[ExifIFD]       OffsetTime                      : +02:00


Quote3. XMP-photoshop:DateCreated would/should show: 06:07:03, as it displays the local time of time the picture was taken

It would show both the date and time
2024:10:14 06:07:03
but it could also show the time zone (and subseconds) depending upon the program that wrote it. This isn't normally written directly from the camera, but I don't keep up with the latest cameras, so this might have changed
C:\Programs\My_Stuff>exiftool -G1 -a -s -DateCreated y:\!temp\Test4.jpg
[XMP-photoshop] DateCreated                     : 2024:10:14 06:07:03.22+02:00

Quote4. XMP:DateTimeOriginal would/should show:      04:07:03, as this displays the UTC time the picture was taken
-------------------
5. Exif:CreateDate: would/should show:          04:07:03, as this displays the UTC time the picture was digitized, and as this is a digital "camera" Exif:DateTimeOriginal=Exif:CreateDate
6. XMP:DateCreated: would/should show:          04:07:03, as this is the XMP equivalent of the Exif:CreateDate (5)

None of these are UTC. They are all set to local time where the image was taken.

The only ones in an image file that would be UTC would be the GPS ones
C:\>exiftool -G1 -a -s -e -GPS* y:\!temp\Test4.jpg
[GPS]           GPSVersionID                    : 2.3.0.0
[GPS]           GPSTimeStamp                    : 04:07:03.22
[GPS]           GPSDateStamp                    : 2024:10:14
[XMP-exif]      GPSDateTime                     : 2024:10:14 04:07:03.22Z

But since XMP-exif:GPSDateTime is an XMP tag, it could hold a time stamp with the time zone
C:\>exiftool -G1 -a -s -GPS* y:\!temp\Test4.jpg
[XMP-exif]      GPSDateTime                     : 2024:10:14 06:07:03.22+02:00

Things are more complicated when it comes to MP4/Mov files. The main time stamps in those files, the CreateDate, ModifyDate, and all the Media*Date/Track*Date tags are to be set to UTC. But the Quicktime:CreationDate and Quicktime:DateTimeOriginal tags are to be set to the local time. By default, exiftool will automatically add a time zone to the latter two because in the past Apple programs would return ridiculous date/times in files that didn't have a time zone.

Additionally, some image files are based upon the MP4 format. Most notably Canon CR3 raw files. In addition to the EXIF time stamps, it will also have the Quicktime time stamps. Exiftool automatically applies the -api QuickTimeUTC option when displaying the Quicktime time stamps in a CR3 file. So in those files, you will see local time where the image was taken in the EXIF tags and local adjusted time for the computer, which would be different if the image wasn't taken in the computer's time zone.

HEIC files are also MP4 based and have EXIF time stamps, and other Quicktime tags, but the samples I have do not have the Quicktime time stamps. I haven't dealt with HEIC files enough to know any more about this.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

orichardt

Hi StarGeek, thank you for your detailed reply. It's really helpful!