Changing CreateDate of a file

Started by marciano, February 21, 2024, 01:18:36 PM

Previous topic - Next topic

marciano

Under MacOS
% exiftool -CreateDate="2024:02:01 11:00:00" GOPR1987.JPGWarning: Invalid date/time (use YYYY:mm:dd HH:MM:SS[.ss][+/-HH:MM|Z]) in ExifIFD:CreateDate (PrintConvInv)
Error: File not found - 11:00:00" GOPR1987.JPG
    0 image files updated
    1 files weren't updated due to errors

Please help on that. Thank you.

Phil Harvey

For some reason the quotes aren't working.  I assume you're using zsh, but I thought double quotes should work there.  Make sure you are using plain quotes and not some fancy 66/99 quotes.  Also maybe try single quotes (') instead.

Oh, and it looks like there could be a fancy non-breaking space after the second quotes.  Try typing in the command instead of cut/paste.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

marciano

Thanks Phil for your help.
I had changed quotes because I remembered I had that copy-paste issue with fancy quotes.
Anyway now I use single quotes and got no errors.
But create date has not changed
QuoteCreate Date                     : 2012:06:09 11:03:30

Phil Harvey

...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

marciano

Quote[ExifIFD]       Date/Time Original              : 2012:06:09 11:03:30
[ExifIFD]       Create Date                     : 2024:02:01 11:00:00
[XMP-photoshop] Date Created                    : 2012:06:09 11:03:30
[XMP-xmp]       Modify Date                     : 2024:02:01

With exiftool -createdate GOPR1987.JPG I get the old date I posted before.


Phil Harvey

What is the output of this command?:

exiftool -createdate -a -G1 GOPR1987.JPG

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

StarGeek

My guess is that there is a second CreateDate in IFD1.
"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

Phil Harvey

@StarGeek: Yes, that could do it.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

marciano

#8
Quote from: Phil Harvey on February 21, 2024, 02:30:11 PMWhat is the output of this command?:

exiftool -createdate -a -G1 GOPR1987.JPG

- Phil
[ExifTool]      ExifTool Version Number        : 12.56
[System]        File Name                      : GOPR1987.JPG
[System]        Directory                      : /Volumes/SSD 500/gopro/fotos editadas/1feb2024
[System]        File Size                      : 5.0 MB
[System]        File Modification Date/Time    : 2024:02:21 15:32:57-03:00
[System]        File Access Date/Time          : 2024:02:21 16:06:48-03:00
[System]        File Inode Change Date/Time    : 2024:02:21 15:32:57-03:00
[System]        File Permissions                : -rwxrwxrwx
[File]          File Type                      : JPEG
[File]          File Type Extension            : jpg
[File]          MIME Type                      : image/jpeg
[File]          Exif Byte Order                : Big-endian (Motorola, MM)
[File]          Current IPTC Digest            : 5417571c236c9eea37d4e80fbbf4f656
[File]          Image Width                    : 4000
[File]          Image Height                    : 3000
[File]          Encoding Process                : Baseline DCT, Huffman coding
[File]          Bits Per Sample                : 8
[File]          Color Components                : 3
[File]          Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
[IFD0]          Image Width                    : 4000
[IFD0]          Image Height                    : 3000
[IFD0]          Bits Per Sample                : 8 8 8
[IFD0]          Photometric Interpretation      : RGB
[IFD0]          Image Description              : DCIM\210GOPRO
[IFD0]          Make                            : GoPro
[IFD0]          Camera Model Name              : Hero3-Black Edition
[IFD0]          Orientation                    : Horizontal (normal)
[IFD0]          Samples Per Pixel              : 3
[IFD0]          X Resolution                    : 72
[IFD0]          Y Resolution                    : 72
[IFD0]          Resolution Unit                : inches
[IFD0]          Software                        : Adobe Photoshop 22.5 (Macintosh)
[IFD0]          Modify Date                    : 2024:02:09 17:34:25
[IFD0]          Y Cb Cr Positioning            : Centered
[ExifIFD]      Exposure Time                  : 1/690
[ExifIFD]      F Number                        : 2.8
[ExifIFD]      Exposure Program                : Program AE
[ExifIFD]      ISO                            : 100
[ExifIFD]      Exif Version                    : 0221
[ExifIFD]      Date/Time Original              : 2012:06:09 11:03:30
[ExifIFD]      Create Date                    : 2024:02:01 11:00:00
[ExifIFD]      Components Configuration        : Y, Cb, Cr, -
[ExifIFD]      Compressed Bits Per Pixel      : 2.507812667
[ExifIFD]      Shutter Speed Value            : 1/689
[ExifIFD]      Aperture Value                  : 2.8
[ExifIFD]      Exposure Compensation          : 0
[ExifIFD]      Max Aperture Value              : 2.8
[ExifIFD]      Subject Distance                : undef
[ExifIFD]      Metering Mode                  : Center-weighted average
[ExifIFD]      Light Source                    : Unknown
[ExifIFD]      Flash                          : No flash function
[ExifIFD]      Focal Length                    : 2.8 mm
[ExifIFD]      Flashpix Version                : 0100
[ExifIFD]      Color Space                    : sRGB
[ExifIFD]      Exif Image Width                : 4000
[ExifIFD]      Exif Image Height              : 3000
[ExifIFD]      Exposure Index                  : undef
[ExifIFD]      Sensing Method                  : One-chip color area
[ExifIFD]      File Source                    : Digital Camera
[ExifIFD]      Scene Type                      : Directly photographed
[ExifIFD]      Custom Rendered                : Normal
[ExifIFD]      Exposure Mode                  : Auto
[ExifIFD]      White Balance                  : Auto
[ExifIFD]      Digital Zoom Ratio              : 1
[ExifIFD]      Focal Length In 35mm Format    : 15 mm
[ExifIFD]      Scene Capture Type              : Standard
[ExifIFD]      Gain Control                    : None
[ExifIFD]      Contrast                        : Normal
[ExifIFD]      Saturation                      : Normal
[ExifIFD]      Sharpness                      : Normal
[ExifIFD]      Device Setting Description      : (Binary data 4 bytes, use -b option to extract)
[ExifIFD]      Subject Distance Range          : Unknown
[InteropIFD]    Interoperability Index          : R98 - DCF basic file (sRGB)
[InteropIFD]    Interoperability Version        : 0100
[IFD1]          Compression                    : JPEG (old-style)
[IFD1]          X Resolution                    : 72
[IFD1]          Y Resolution                    : 72
[IFD1]          Resolution Unit                : inches
[IFD1]          Thumbnail Offset                : 1082
[IFD1]          Thumbnail Length                : 4281
[IFD1]          Thumbnail Image                : (Binary data 4281 bytes, use -b option to extract)
[IPTC]          Application Record Version      : 0
[IPTC]          Caption-Abstract                : DCIM\210GOPRO
[IPTC]          Date Created                    : 2012:06:09
[IPTC]          Time Created                    : 11:03:30
[Photoshop]    IPTC Digest                    : 5417571c236c9eea37d4e80fbbf4f656
[Photoshop]    X Resolution                    : 72
[Photoshop]    Displayed Units X              : inches
[Photoshop]    Y Resolution                    : 72
[Photoshop]    Displayed Units Y              : inches
[Photoshop]    Print Style                    : Centered
[Photoshop]    Print Position                  : 0 0
[Photoshop]    Print Scale                    : 1
[Photoshop]    Global Angle                    : 30
[Photoshop]    Global Altitude                : 30
[Photoshop]    URL List                        :
[Photoshop]    Slices Group Name              : GOPR1987
[Photoshop]    Num Slices                      : 1
[Photoshop]    Pixel Aspect Ratio              : 1
[Photoshop]    Photoshop Thumbnail            : (Binary data 4281 bytes, use -b option to extract)
[Photoshop]    Has Real Merged Data            : Yes
[Photoshop]    Writer Name                    : Adobe Photoshop
[Photoshop]    Reader Name                    : Adobe Photoshop 2021
[Photoshop]    Photoshop Quality              : 12
[Photoshop]    Photoshop Format                : Standard
[XMP-x]        XMP Toolkit                    : Image::ExifTool 12.56
[XMP-dc]        Description                    : DCIM\210GOPRO
[XMP-dc]        Format                          : image/jpeg
[XMP-photoshop] Color Mode                      : RGB
[XMP-photoshop] Date Created                    : 2012:06:09 11:03:30
[XMP-photoshop] ICC Profile Name                : sRGB IEC61966-2.1
[XMP-xmp]      Create Date                    : 2024:02:01 11:00:00
[XMP-xmp]      Creator Tool                    : HD3.03.03.00......
[XMP-xmp]      Metadata Date                  : 2024:02:09 17:34:25-03:00
[XMP-xmp]      Modify Date                    : 2024:02:01
[XMP-xmpMM]    Document ID                    : 4A5AADAE8C378819003382D7F0AB7748
[XMP-xmpMM]    History Action                  : saved
[XMP-xmpMM]    History Changed                : /
[XMP-xmpMM]    History Instance ID            : xmp.iid:b4bf93b0-e787-4c90-8083-87c3162a71df
[XMP-xmpMM]    History Software Agent          : Adobe Photoshop 22.5 (Macintosh)
[XMP-xmpMM]    History When                    : 2024:02:09 17:34:25-03:00
[XMP-xmpMM]    Instance ID                    : xmp.iid:b4bf93b0-e787-4c90-8083-87c3162a71df
[XMP-xmpMM]    Original Document ID            : 4A5AADAE8C378819003382D7F0AB7748
[ICC-header]    Profile CMM Type                : Linotronic
[ICC-header]    Profile Version                : 2.1.0
[ICC-header]    Profile Class                  : Display Device Profile
[ICC-header]    Color Space Data                : RGB
[ICC-header]    Profile Connection Space        : XYZ
[ICC-header]    Profile Date Time              : 1998:02:09 06:49:00
[ICC-header]    Profile File Signature          : acsp
[ICC-header]    Primary Platform                : Microsoft Corporation
[ICC-header]    CMM Flags                      : Not Embedded, Independent
[ICC-header]    Device Manufacturer            : Hewlett-Packard
[ICC-header]    Device Model                    : sRGB
[ICC-header]    Device Attributes              : Reflective, Glossy, Positive, Color
[ICC-header]    Rendering Intent                : Perceptual
[ICC-header]    Connection Space Illuminant    : 0.9642 1 0.82491
[ICC-header]    Profile Creator                : Hewlett-Packard
[ICC-header]    Profile ID                      : 0
[ICC_Profile]  Profile Copyright              : Copyright (c) 1998 Hewlett-Packard Company
[ICC_Profile]  Profile Description            : sRGB IEC61966-2.1
[ICC_Profile]  Media White Point              : 0.95045 1 1.08905
[ICC_Profile]  Media Black Point              : 0 0 0
[ICC_Profile]  Red Matrix Column              : 0.43607 0.22249 0.01392
[ICC_Profile]  Green Matrix Column            : 0.38515 0.71687 0.09708
[ICC_Profile]  Blue Matrix Column              : 0.14307 0.06061 0.7141
[ICC_Profile]  Device Mfg Desc                : IEC http://www.iec.ch
[ICC_Profile]  Device Model Desc              : IEC 61966-2.1 Default RGB colour space - sRGB
[ICC_Profile]  Viewing Cond Desc              : Reference Viewing Condition in IEC61966-2.1
[ICC_Profile]  Luminance                      : 76.03647 80 87.12462
[ICC_Profile]  Technology                      : Cathode Ray Tube Display
[ICC_Profile]  Red Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
[ICC_Profile]  Green Tone Reproduction Curve  : (Binary data 2060 bytes, use -b option to extract)
[ICC_Profile]  Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
[ICC-view]      Viewing Cond Illuminant        : 19.6445 20.3718 16.8089
[ICC-view]      Viewing Cond Surround          : 3.92889 4.07439 3.36179
[ICC-view]      Viewing Cond Illuminant Type    : D50
[ICC-meas]      Measurement Observer            : CIE 1931
[ICC-meas]      Measurement Backing            : 0 0 0
[ICC-meas]      Measurement Geometry            : Unknown
[ICC-meas]      Measurement Flare              : 0.999%
[ICC-meas]      Measurement Illuminant          : D65
[Adobe]        DCT Encode Version              : 100
[Adobe]        APP14 Flags 0                  : [14]
[Adobe]        APP14 Flags 1                  : (none)
[Adobe]        Color Transform                : YCbCr
[Composite]    Aperture                        : 2.8
[Composite]    Image Size                      : 4000x3000
[Composite]    Megapixels                      : 12.0
[Composite]    Scale Factor To 35 mm Equivalent: 5.4
[Composite]    Shutter Speed                  : 1/690
[Composite]    Date/Time Created              : 2012:06:09 11:03:30
[Composite]    Circle Of Confusion            : 0.006 mm
[Composite]    Field Of View                  : 100.4 deg
[Composite]    Focal Length                    : 2.8 mm (35 mm equivalent: 15.0 mm)
[Composite]    Hyperfocal Distance            : 0.49 m
[Composite]    Light Value                    : 12.4

StarGeek

None of that output shows the CreateDate as "2012:06:09 11:03:30", though there are plenty of other time tags that do.

When you say the "Create Date" is the old date, are you looking at the data with exiftool or some other program?  If it is some other program, then that program isn't reading the CreateDate tag, it's reading one of those other date/time tags.
"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

marciano

Hi,
It is a script that uses Exiftool data.
I fix that using -AllDates
Thank you.