-
Notifications
You must be signed in to change notification settings - Fork 296
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
Inconsistency constructing composite datetime written by exiv2 vs exiftool #213
Comments
I fat-fingered the original issue submission but have now edited to contain all the details. Here is a sample input file to run the above commands on, click to expand, copy it as `test1.JPG` in some directory.I am running exiftool 12.63 and exiv2 0.27.6. It's unclear 100% if it's exiv2 writing that's the fault, or if it's exiftool reading/constructing the composite values at fault. But I cannot see any difference when examining the written metadata using either |
What is rhe output of |
The output is very large. I attached an image in the post above, you can run it yourself to have a look. |
The offsets are stored the same in both cases after writing with
However the order with respect to other tags is a bit difference. Not sure if that's the cause of this bug. I can't see any other tags that contain the time zone offset. |
Could you post the sample problem file? I don't have exiv2 installed so I can't run that command.
|
A sample problem file is linked two posts above, click the HTML details element to expand the image. |
In the problem file written by Exiv2, the date/times are in the wrong format: | | 5) DateTimeOriginal = 2023-07-21 21:06:26 EXIF uses colons as date separators, not dashes. |
Ah right, thanks. I guess the "problem" then is that exiv2 doesn't do any conversion from dash to colon, whereas exiftool does. It's easy to miss when checking manually since your eye just expects there to be a dash there. Maybe it would be useful for exiftool to output a warning when it detects incorrectly formatted dates. |
The -validate option gives you this warning: % exiftool 255207878-1b66909c-5b10-4ffd-b177-202046f4dd8c.JPG -validate -warning -a |
I think it would be better to bump up invalid data to a "normal" or "high" warning severity and show it by default even outside of the validate option. By default even outside of the validate option, exiftool shows me this:
Invalid data that exiftool knows is invalid, is more important than unrecognised or unknown - it means something clearly went wrong somewhere. Granted, exiv2 doesn't do this either and I'll go file a bug to them as well. On the specific case of this timezone issue, it's also weird why exiftool decides it's ok to concatenate the subsecond time onto an invalid date, but it's not ok to concatenate the timezone onto it. |
Timezone in composite dates.
Timezone still in composite dates, after writing with
exiftool
.No timezone in composite dates, after writing with
exiv2
. But the offset is still there.Timezone back in composite dates, after re-writing with
exiftool
.The text was updated successfully, but these errors were encountered: