Wrong date on some older photos?
Hello,
I have some older photos that have file created and modified dates wrong, but the EXIF is correct. It has the EXIF date taken with the correct dates.
However, Immich is still using the created date.
I updated to 1.81 and refreshed the metadata for those items and the problem persisted.
Here is an example photo directly as it saved on my NAS:
https://gofile.me/6XtEp/5yrvho0Ct
Thank you!
22 Replies
Should I post this as an issue on github?
for what it's worth, I tried replicating your issue and got the same result
tried comparing your photo (left) with one of mine (right) which has correct EXIF data on immich

Date/Time Original
looks correct but immich doesn't use it for some reason
ah wait, maybe it doesn't look right
2003:06:05:18:00:00
separates the date and time with a colon
instead of a spacefixed it:

after running
exiftool -DateTimeOriginal="2003:06:05 18:00:00" "fotos 013.jpg"
btw it seems the metadata extraction job tries to parse datetime fields in this order and chooses the first valid existing one
GitHub
immich/server/src/domain/metadata/metadata.service.ts at 7b4e36e990...
Self-hosted photo and video backup solution directly from your mobile phone. - immich-app/immich
(lines 326-337, don't know how to permalink to that section)
so on your file one of the file specific timestamps ends up being used
@harababurel thank you, do you think that's a bug?
probably not, I suspect the EXIF data is just wrong
but I'm not familiar with the exact spec
let me take a look
I have lots of photos with that problem, mostly old ones. I could try to find a way of correcting the exif maybe?
hmmm
I wonder if I'm the only one with photos like this
$ exiftool -if '$DateTimeOriginal =~ /:\d{2}:\d{2}:\d{2}$/' -filename .
maybe try this, should detect which files have the same probleminteresting, let me set this up
or better yet
exiftool -if '$DateTimeOriginal =~ /:\d{2}:\d{2}:\d{2}/' -filename .
since some files might have a timezone at the end of that fieldtrying to run it with the windows executable, not sure about the syntax on powershell
it worked
exiftool -if "$DateTimeOriginal -match ':\d{2}:\d{2}:\d{2}'" -filename .
should work in powershell
(this is all GPT generated so take it with a grain of salt)I have some other files that still have the date not correct in immich, but that filter doesn't get them
do you mind having a look at one?
sure
oh
I think this one doesn't even have any exif