"Metadata Date" different from "File Creation Date/Time"

Started by raket4u, August 03, 2020, 01:04:07 PM

Previous topic - Next topic

raket4u

I have som jpeg photos, where create date, modified date are wrom, but the Metadata Date is correct.
How do i change the "File Creation Date/Time" to "Metadata Date" ?

Here is the exiftool data for the photo:
______________________________________
---- ExifTool ----
ExifTool Version Number         : 12.03
---- File ----
File Name                       : IMG_4876.jpg
Directory                       : .
File Size                       : 23 MB
File Modification Date/Time     : 2020:07:31 18:18:07+02:00
File Access Date/Time           : 2020:08:01 23:46:49+02:00
File Creation Date/Time         : 2020:08:01 23:46:49+02:00
File Permissions                : rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Image Width                     : 6000
Image Height                    : 4000
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
---- EXIF ----
X Resolution                    : 240
Y Resolution                    : 240
Resolution Unit                 : inches
Exif Version                    : 0231
Color Space                     : sRGB
Compression                     : JPEG (old-style)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Thumbnail Offset                : 214
Thumbnail Length                : 12930
Thumbnail Image                 : (Binary data 12930 bytes, use -b option to extract)
---- Photoshop ----
X Resolution                    : 240
Displayed Units X               : inches
Y Resolution                    : 240
Displayed Units Y               : inches
Photoshop Thumbnail             : (Binary data 12930 bytes, use -b option to extract)
---- ICC_Profile ----
Profile CMM Type                : Linotronic
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Primary Platform                : Microsoft Corporation
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             : Hewlett-Packard
Device Model                    : sRGB
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Perceptual
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 : Hewlett-Packard
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
Media White Point               : 0.95045 1 1.08905
Media Black Point               : 0 0 0
Red Matrix Column               : 0.43607 0.22249 0.01392
Green Matrix Column             : 0.38515 0.71687 0.09708
Blue Matrix Column              : 0.14307 0.06061 0.7141
Device Mfg Desc                 : IEC http://www.iec.ch
Device Model Desc               : IEC 61966-2.1 Default RGB colour space - sRGB
Viewing Cond Desc               : Reference Viewing Condition in IEC61966-2.1
Viewing Cond Illuminant         : 19.6445 20.3718 16.8089
Viewing Cond Surround           : 3.92889 4.07439 3.36179
Viewing Cond Illuminant Type    : D50
Luminance                       : 76.03647 80 87.12462
Measurement Observer            : CIE 1931
Measurement Backing             : 0 0 0
Measurement Geometry            : Unknown
Measurement Flare               : 0.999%
Measurement Illuminant          : D65
Technology                      : Cathode Ray Tube Display
Red Tone Reproduction Curve     : (Binary data 2060 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 2060 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 2060 bytes, use -b option to extract)
---- XMP ----
XMP Toolkit                     : Adobe XMP Core 5.6-c140 79.160451, 2017/05/06-01:08:21
Original Document ID            : 502EBF7F710B7ADAAD11741380579BA4
Document ID                     : xmp.did:75c19d3f-ddfe-4d80-b662-a0ad5398f422
Instance ID                     : xmp.iid:75c19d3f-ddfe-4d80-b662-a0ad5398f422
Metadata Date                   : 2020:07:24 21:05:15Z
---- APP14 ----
DCT Encode Version              : 100
APP14 Flags 0                   : [14], Encoded with Blend=1 downsampling
APP14 Flags 1                   : (none)
Color Transform                 : YCbCr
---- Composite ----
Image Size                      : 6000x4000
Megapixels                      : 24.0


StarGeek

That's very odd that the MetadataDate would be accurate, as that is the timestamp for when the metadata was last edited.  Also the fact that there's none of the normal EXIF timestamps.

One possible problem.  The MetadataDate has a "Z" on the end, indicating that it's set to UTC.  That means it would be 2020:07:24 23:05:15 when adjusted to your time zone.

To set the FileCreateDate to equal the MetadataDate as written (ignoring the UTC difference), you would use this command
exiftool "-FileCreateDate<${MetadataDate;s/Z$//i}" /path/to/file/

If this command is run under Unix/Mac, reverse any double/single quotes to avoid bash interpretation.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).

raket4u

Thank You so much!!
Is it possible to change both the createdate and the modifydate in one command
i tryed
exiftool "-FileModifyDate<${MetadataDate;s/Z$//i}" "-FileCreateDate<${MetadataDate;s/Z$//i}"*.jpg
but that didn't work
but
exiftool "-FileModifyDate<${MetadataDate;s/Z$//i}" *.jpg
end then
exiftool "-FileCreateDate<${MetadataDate;s/Z$//i}" *.jpg 
worked

StarGeek

The first should work (unless you're on Mac/Linux due to quoting differences).  The problem is that you didn't put a space before *.jpg
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).


raket4u

Now i have a photo from my mobile phone, where the "Date/Time Original" differ from :

File Modification Date/Time ,  File Access Date/Time  and  File Creation Date/Time 

But how do i change the File Creation Date/Time  so it is equal to "Date/Time Original" ??
------------------------

ExifTool Version Number         : 12.03
File Name                       : Jan_oneplus_IMG_20200724_100401__01.jpg
Directory                       : .
File Size                       : 1064 kB
File Modification Date/Time     : 2020:08:02 14:53:05+02:00
File Access Date/Time           : 2020:08:05 19:07:02+02:00
File Creation Date/Time         : 2020:08:02 14:53:05+02:00

File Permissions                : rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
JFIF Version                    : 1.01
Exif Byte Order                 : Big-endian (Motorola, MM)
Make                            : OnePlus
Camera Model Name               : GM1913
Software                        : Picasa
Modify Date                     : 2020:08:02 14:53:04
Artist                          : Picasa
Exif Version                    : 0220
Date/Time Original              : 2020:07:24 10:04:02
Exif Image Width                : 3405
Exif Image Height               : 1608
Interoperability Version        : 0100
Related Image Width             : 3405
Related Image Height            : 1608
Image Unique ID                 : dcd1b262458b1ee193a1cb236d2fc6ef
Compression                     : JPEG (old-style)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Thumbnail Offset                : 458
Thumbnail Length                : 2994
XMP Toolkit                     : XMP Core 5.1.2
Creator                         : Picasa
Profile CMM Type                :
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Color Space Data                : RGB
Profile Connection Space        : XYZ
Profile Date Time               : 0000:00:00 00:00:00
Profile File Signature          : acsp
Primary Platform                : Unknown ()
CMM Flags                       : Not Embedded, Independent
Device Manufacturer             :
Device Model                    :
Device Attributes               : Reflective, Glossy, Positive, Color
Rendering Intent                : Media-Relative Colorimetric
Connection Space Illuminant     : 0.9642 1 0.82491
Profile Creator                 :
Profile ID                      : 0
Profile Description             : sRGB
Red Matrix Column               : 0.43607 0.22249 0.01392
Green Matrix Column             : 0.38515 0.71687 0.09708
Blue Matrix Column              : 0.14307 0.06061 0.7141
Red Tone Reproduction Curve     : (Binary data 40 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 40 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 40 bytes, use -b option to extract)
Media White Point               : 0.9642 1 0.82491
Profile Copyright               : Google Inc. 2016
Current IPTC Digest             : bc1e6ce1b27464f1d8d915849d8b1201
Envelope Record Version         : 4
Coded Character Set             : UTF8
Application Record Version      : 4
Date Created                    : 2020:07:24
Time Created                    : 10:04:02+02:00
By-line                         : Picasa
IPTC Digest                     : bc1e6ce1b27464f1d8d915849d8b1201
Image Width                     : 3405
Image Height                    : 1608
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Thumbnail Image                 : (Binary data 2994 bytes, use -b option to extract)
Date/Time Created               : 2020:07:24 10:04:02+02:00
Image Size                      : 3405x1608
Megapixels                      : 5.5

Phil Harvey

Quote from: raket4u on August 05, 2020, 01:49:15 PM
But how do i change the File Creation Date/Time  so it is equal to "Date/Time Original" ??

exiftool "-filecreatedate<datetimeoriginal" FILE

- 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 ($).