OffsetTimeOriginal not written

Started by pdj2225m, March 07, 2022, 08:57:05 PM

Previous topic - Next topic

pdj2225m

I have a vague memory that Phil answered a similar question in the forum saying that a tag was not officially supported for some types of media, so I suspect there is a similar reason why the OffsetTimeOriginal tag cannot be written to an xmp file, despite the documentation that shows it is writeable, with no comment in the documentation or execution to warn about any restriction.

The original file has DateTimeOriginal and OffsetTimeOriginal, but when I create an xmp file for it, the OffsetTimeOriginal is not written, nor does writing the tag directly work.

[Autumn:com~apple~CloudDocs/Device Buffers/blue] pdj% exiftool -a -s -G0:1 -m -DateTimeOriginal -OffsetTimeOriginal -CreationDate -GPSDateTime -CreateDate -ModifyDate -FileModifyDate IMG_1200.heic -o IMG_1200.xmp
    1 image files created
[Autumn:com~apple~CloudDocs/Device Buffers/blue] pdj% exiftool -a -s -G0:1 -m -DateTimeOriginal -OffsetTimeOriginal -CreationDate -GPSDateTime -CreateDate -ModifyDate -FileModifyDate IMG_1200.*
======== IMG_1200.heic
[EXIF:ExifIFD]  DateTimeOriginal                : 2022:03:07 09:58:04
[EXIF:ExifIFD]  OffsetTimeOriginal              : -07:00
[EXIF:ExifIFD]  CreateDate                      : 2022:03:07 09:58:04
[XMP:XMP-xmp]   CreateDate                      : 2022:03:07 09:58:04
[EXIF:IFD0]     ModifyDate                      : 2022:03:07 09:58:04
[XMP:XMP-xmp]   ModifyDate                      : 2022:03:07 09:58:04
[File:System]   FileModifyDate                  : 2022:03:07 10:05:28-07:00
======== IMG_1200.xmp
[XMP:XMP-exif]  DateTimeOriginal                : 2022:03:07 09:58:04
[XMP:XMP-xmp]   CreateDate                      : 2022:03:07 09:58:04
[XMP:XMP-xmp]   ModifyDate                      : 2022:03:07 09:58:04
[File:System]   FileModifyDate                  : 2022:03:07 17:36:42-07:00
    2 image files read
[Autumn:com~apple~CloudDocs/Device Buffers/blue] pdj% exiftool -s -m -OffsetTimeOriginal='-07:00' IMG_1200.xmp                                                                        0 image files updated
    1 image files unchanged
[Autumn:com~apple~CloudDocs/Device Buffers/blue] pdj%


Note the changes in groups in this process. Using the original groups on the last command has the same result.

My use case is trying to correct capture times that are botched on import to an application while keeping the original file intact, hence I  provide the correct time in the .xmp file.

Most of the botches occur on video files which have just DateTimeOriginal but the app uses the time zone where the import is being done to compute a local time. That makes sorting photos and videos by date nonsense. Apple files do have time zone info in CreationTime which the app sometimes correctly maps into DateTimeOriginal in the zone where they were shot, but some other media are off by a few time zones.

   • Is this expected behavior?
   • Is there some override to allow this tag to be written?

Thanks,
   pdj

StarGeek

Quote from: pdj2225m on March 07, 2022, 08:57:05 PM
I have a vague memory that Phil answered a similar question in the forum saying that a tag was not officially supported for some types of media, so I suspect there is a similar reason why the OffsetTimeOriginal tag cannot be written to an xmp file, despite the documentation that shows it is writeable, with no comment in the documentation or execution to warn about any restriction.

OffsetTimeOriginal, as well as OffsetTime and OffsetTimeDigitized are EXIF tags.  You cannot write them to an xmp files, they do not exist.  You can only write XMP tags to an xmp file.

The time based tags in XMP, such as XMP:CreateDate and XMP:ModifyDate allow for the inclusion of time zones.  See the first example in FAQ #5.
"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