ExifTool Forum

ExifTool => Newbies => Topic started by: UCLAGeek on August 06, 2013, 02:34:01 PM

Title: [Solved] Getting Invalid date/time setting DateTimeOrig but format is correct
Post by: UCLAGeek on August 06, 2013, 02:34:01 PM
Hi,

I'm using OSX I know exiftool can not read the files creation date so I'm writing a bash script that will take the system Creation Date and tell exiftool to add that date to the file.

This is the format of the date 2013:08:06 10:08:06. Here's my code:

exiftool '-EXIF:DateTimeOriginal='2013:08:06 10:08:06' ' test.jpg
Warning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD:DateTimeOriginal (PrintConvInv)
Nothing to do.


I'm not sure where I'm screwing up. Does the DateTimeOriginal require and offset for the time zone?
Title: Re: Getting Invalid date/time setting DateTimeOrig but format is correct
Post by: UCLAGeek on August 06, 2013, 04:14:10 PM
Figured it out.

here's the code if anyone is interested:

exiftool -xmp:dateTimeOriginal='2013:08:06 10:08:06' ' test.jpg
Title: Re: [Solved] Getting Invalid date/time setting DateTimeOrig but format is correct
Post by: Phil Harvey on August 06, 2013, 06:53:19 PM
I think you still have an extra quote.  It should be:

exiftool -xmp:dateTimeOriginal='2013:08:06 10:08:06' test.jpg

which will work on Mac/Linux.  Or this, which will work on any system:

exiftool -xmp:dateTimeOriginal="2013:08:06 10:08:06" test.jpg

- Phil