I've been using exiftool for years and discovered a recent change to the handling of dates.
I process a lot of scans of old photos and often know only the year or possibly year and month. I have a script that allows me to specify the known value, say "1946" or 2003:07", and then update the EXIF data with a date string like "1947:00:00" or "2003:07:00" and this has worked great for years. However, I recently discovered that exiftool is now rejecting the "00" portions of the date and forcing me to specify a "valid" value which is actually unknown and therefore wrong.
I really prefer the old behavior and would like to restore it. Is there any sort of switch or parameter I can set to allow the entering of "00"?
Thanks.
Quote from: cjsmall on July 04, 2023, 02:01:33 PMI've been using exiftool for years and discovered a recent change to the handling of dates.
I believe that was with version 12.14, Jan. 6, 2021 (https://exiftool.org/ancient_history.html#v12.14)
QuotePatched to issue warning and avoid writing date/time values with a zero month or day number
You can force exiftool to write any value you want to the EXIF time stamps, such as
CreateDate,
DateTimeOriginal, and
ModifyDate, by using the
-n (
--printConv) option (https://exiftool.org/exiftool_pod.html#n---printConv) which would be a global change (and may affect other tags), or on individual tags with the hashtag shortcut.
For example
exiftool -DateTimeOriginal#="2003:07:00 00:00:00" file.jpgTechnically, the EXIF spec calls for blank spaces when a time component isn't known. So the above should be
exiftool -DateTimeOriginal#="2003:07: : : " file.jpg
Thank you for the reply. I wasn't aware of the "#=" notation. I modified my scripts to add this and now everything is working again.
I'm currently using version 12:40. I guess I haven't tried to date many pre-digital scans recently as I had not noticed this issue until a few days ago when I was fixing some historical family photos.