Remove timezone from Content Create Date

Started by trymeout, May 25, 2021, 12:36:43 AM

Previous topic - Next topic

trymeout

Hello,

Is there a easy way to remove the timezone from the "Content Create Date " metadata date and time field?

Change it from this

Content Create Date             : 2022:11:22 12:00:00-06:00


And change it to this without reentering the date and time.

Content Create Date             : 2022:11:22 12:00:00

Is there a simple command that can do this to save time from having to reenter the date and time?

Thanks in advanced

Luuk2005

Can use a s/match/replace/ like...  -ContentCreateDate"<${ContentCreateDate; s/-.*//}"
Windows8.1-64bit,  exiftool-v12.92(standalone),  sed-v4.0.7

StarGeek

Quote from: Luuk2005 on May 25, 2021, 05:14:13 AM
Can use a s/match/replace/ like...  -ContentCreateDate"<${ContentCreateDate; s/-.*//}"

This won't work with versions 12.13+.  Because Apple will display wildly inaccurate dates when there isn't a timezone present in the string based Quicktime date/time tags, exiftool will automatically add the local time zone to the date if a time zone isn't included.  The can be suppressed with the -n (--printConv) option or its hashtag # shorthand.
exiftool "-ContentCreateDate#<${ContentCreateDate; s/-.*//}" /path/to/files/
"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

trymeout

This does work with any timezone before 00:00, but it will not work with timezones that are after 00:00 such as +05:00.

StarGeek

Ah, yes, try this
exiftool "-ContentCreateDate#<${ContentCreateDate; s/[+-].*//}" /path/to/files/

C:\>exiftool -g1 -a -s -ContentCreateDate "Y:\!temp\Test1.mp4"
---- ItemList ----
ContentCreateDate               : 2021:05:25 09:53:30-07:00

C:\>exiftool -P -overwrite_original "-ContentCreateDate#<${ContentCreateDate; s/[+-].*//}" "Y:\!temp\Test1.mp4"
    1 image files updated

C:\>exiftool -g1 -a -s -ContentCreateDate "Y:\!temp\Test1.mp4"
---- ItemList ----
ContentCreateDate               : 2021:05:25 09:53:30

C:\>exiftool -P -overwrite_original -all= -ContentCreateDate="2021:05:25 09:53:30+07:00" "Y:\!temp\Test1.mp4"
    1 image files updated

C:\>exiftool -g1 -a -s -ContentCreateDate "Y:\!temp\Test1.mp4"
---- ItemList ----
ContentCreateDate               : 2021:05:25 09:53:30+07:00

C:\>exiftool -P -overwrite_original "-ContentCreateDate#<${ContentCreateDate; s/[+-].*//}" "Y:\!temp\Test1.mp4"
    1 image files updated

C:\>exiftool -g1 -a -s -ContentCreateDate "Y:\!temp\Test1.mp4"
---- ItemList ----
ContentCreateDate               : 2021:05:25 09:53:30
"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

trymeout