Menu ▾ ▴

In XMP Sidecar files: Cannot write a timezone in tag <photoshop:DateCreated>

Pukeko
2026-11-17
2026-11-18
  • Pukeko

    Pukeko - 2026-11-17

    How do I write a timezone offset into the tag <photoshop:datecreated> in a XMP sidecar file using exiftool?
    I can write the date and time without problems but cannot achieve by any means to make exiftool write the complete format, which is for example "2026-11-17T12:34:56-01:00:00".
    If I add the line
    <photoshop:datecreated>2026-11-17T12:34:56-01:00:00</photoshop:datecreated>
    manually to the file, I can read out this tag correctly with exiftool.
    But how can I force exiftool to add it to the file in this format that includes the timezone information via the command line?
    Anyone any ideas that work?</photoshop:datecreated>

     
  • StarGeek

    StarGeek - 2026-11-17

    This is probably FAQ #5, How do I format date and time information for writing.

    AFAIK, there aren't any time zones that include seconds. The ISO 8601 standard doesn't include an option for seconds.

    Drop the seconds from the time zone and your command works correctly.

    C:\>exiftool -P -overwrite_original -DateCreated="2026-11-17T12:34:56-01:00" y:\!temp\Test3.xmp
        1 image files updated
    
    C:\>exiftool -time:all --system:all -G1 -a -s y:\!temp\Test3.xmp
    [XMP-photoshop] DateCreated                     : 2026:11:17 12:34:56-01:00
    
     

    Last edit: StarGeek 2026-11-17
  • StarGeek

    StarGeek - 2026-11-17

    Checking List of UTC offsets the only ones that aren't :00 offset are :30 and :45. I thought there was a :15 offset, but I guess I had that mixed up with :45.

    None of the listed offsets include seconds.

     
  • Pukeko

    Pukeko - 2026-11-17

    Thanks so much, StarGeek. Sometimes, one starts missing the forest for the trees. I am well aware of the seconds in the timezones but forgot this for a moment, because usually an error message pops up when exiftool detects a wrong format. In this case, it didn't happen and I got trapped by my own blindness...

     
  • Phil Harvey

    Phil Harvey - 2026-11-18

    Note that the dashes and "T" formatting is completely unnecessary, and even possibly misleading. ExifTool expects date/times in EXIF format "YYYY:MM:DD hh:mm:ss-hh:mm" and will reformat properly for XMP. It only tolerates the T's and dashes and any other garbage between the numbers if the -n option is not used.

     

    Last edit: Phil Harvey 2026-11-18

Log in to post a comment.