-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retrieving Exif IFD0:Date/Time in (possibly) the wrong format. #686
Comments
Can you share your code? It's possible that the date is being parsed and reformatted on your machine to a local culture's date format. |
@mbmast @drewnoakes This issue arises because the DateTime field in the Exif metadata is stored in RFC 2822 format as ASCII values, rather than following the Exif DateTime format ("YYYY:MM:DD HH:MM:SS"). The current implementation does not handle this discrepancy and simply outputs the stored value. To address this, it seems necessary to implement additional processing, such as delegating the responsibility of handling this field to ExifIFD0Descriptor, to ensure proper formatting or error handling in compliance with Exif standards. For reference, the Exif standard specifies the required DateTime format on page 44 of the official document: Exif Standard (CIPA DC-008-2012). |
The library does go to some effort to try and parse the date when it can, but it doesn't support this format. See: metadata-extractor/Source/com/drew/metadata/Directory.java Lines 879 to 894 in 0c3452b
Sharing your code would be helpful. |
I’ll post some code after the Thanksgiving holiday. On Nov 26, 2024, at 03:18, Drew Noakes ***@***.***> wrote:
image.png (view on web)
Sat Feb 04 18:44:14 2006 is the value stored in the image. As @DAN-MU-ZI says, this is not the expected format. You can try and parse it yourself if you like.
The library does go to some effort to try and parse the date when it can, but it doesn't support this format. See:
https://github.com/drewnoakes/metadata-extractor/blob/0c3452bf1c4556724930281ffd97f65b66bfd697/Source/com/drew/metadata/Directory.java#L879-L894
Sharing your code would be helpful.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Possible issue, not really certain.
Using metadata-extractor-2.19.0.jar against the attached file, I get the following metadata tag
Exif IFD0:Date/Time
value:Sat Feb 04 18:44:14 2006
. Isn't this formatted incorrectly for this tag? Shouldn't it be formatted like this:YYYY:MM:DD HH:MM:SS
?The text was updated successfully, but these errors were encountered: