Skip to content
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

Immich using "Modification Date/Time" instead of "Date/Time Original" #14824

Open
1 of 3 tasks
oflaki opened this issue Dec 20, 2024 · 8 comments
Open
1 of 3 tasks

Immich using "Modification Date/Time" instead of "Date/Time Original" #14824

oflaki opened this issue Dec 20, 2024 · 8 comments

Comments

@oflaki
Copy link

oflaki commented Dec 20, 2024

The bug

Certain images uploaded through the web interface uses the Modification Date/Time instead of the Date/Time Original of the image. This does not apply to all images uploaded through the web, only a certain selection. The source of these images are from the same device, and all processed through Lightroom. I ran these images through exiftool, and all their date/time original are correct (2 year ago), and the modification date/time are more or less this week. But still, some of these are showing under their modification date/time, and some under their original date/time.

The OS that Immich Server is running on

Linux 6.1.0-0.deb11.21-amd64

Version of Immich Server

v1.123.0

Version of Immich Mobile App

v1.123.0 build.172

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /srv/.../External Libraries/Perso:/mnt/media/Perso:ro
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:2283
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:b6124ab2e45cc332e16398022a411d7e37181f21ff7874835e0180f56a09e82a
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
       - /srv/.../data
    restart: always

volumes:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION="/srv/.../Mobile"

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION="v1.123.0"

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD="###"

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=###
DB_USERNAME=###
DB_DATABASE_NAME=###
DB_DATA_LOCATION=./postgres

REDIS_HOSTNAME=###

Reproduction steps

1.Drag and drop onto the immich browser OR through Immich Lightroom plugin
2.Image appears under modify date and not original date
3.Tried running refresh metadata with no success

Relevant log output

[Nest] 17  - 12/20/2024, 2:41:02 PM    WARN [Api:UserService~50g6q06l] Unknown keys found: {
  "machineLearning": {
    "classification": {
      "enabled": true
    }
  }
}
[Nest] 7  - 12/20/2024, 2:41:02 PM    WARN [Microservices:MetadataService] Asset b1dc5d72-faef-46d9-8160-075f17b7ae55 has no valid date, falling back to asset.fileCreatedAt
[Nest] 7  - 12/20/2024, 2:41:02 PM    WARN [Microservices:MetadataService] Asset 9b377c82-cf59-486a-ab89-88820bb3bda6 has no valid date, falling back to asset.fileCreatedAt
[Nest] 17  - 12/20/2024, 2:41:04 PM    WARN [Api:UserService~rajv2dql] Unknown keys found: {
  "machineLearning": {
    "classification": {
      "enabled": true
    }
  }
}
[Nest] 7  - 12/20/2024, 2:42:11 PM    WARN [Microservices:MetadataService] Asset 6777cd2b-1ba5-4dba-80c6-904987663cb6 has no valid date, falling back to asset.fileCreatedAt
[Nest] 7  - 12/20/2024, 2:42:11 PM    WARN [Microservices:MapRepository] Response from database for reverse geocoding latitude: 54.713778915, longitude: -61.0574104383333 was null
[Nest] 17  - 12/20/2024, 2:42:14 PM     LOG [Api:EventRepository] Websocket Disconnect: nlehEt2ZzBHnN-nhAAAz
[Nest] 17  - 12/20/2024, 2:42:14 PM    WARN [Api:SystemConfigService~xifudcv2] Unknown keys found: {
  "machineLearning": {
    "classification": {
      "enabled": true
    }
  }
}
[Nest] 17  - 12/20/2024, 2:42:15 PM    WARN [Api:ServerService~54r5saya] Unknown keys found: {
  "machineLearning": {
    "classification": {
      "enabled": true
    }
  }
}

Additional information

The Immich log states that the images has no valid date, falling back to asset.fileCreatedAt. However, when I run the image through exiftool, the image does have an original date.

ExifTool Version Number : 13.09
File Name : 240221_101422_Nunatsiavut Land.jpg
Directory : C:/Users/Max/Downloads
File Size : 11 MB
Zone Identifier : Exists
File Modification Date/Time : 2024:12:19 16:44:33-05:00
File Access Date/Time : 2024:12:20 09:47:15-05:00
File Creation Date/Time : 2024:12:19 16:44:33-05: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 Description : Nunatsiavut Land
Make : Canon
Camera Model Name : Canon EOS R5 C
X Resolution : 72
Y Resolution : 72
Resolution Unit : inches
Software : Adobe Photoshop Lightroom Classic 14.1 (Windows)
Modify Date : 2024:12:19 12:17:32
Exposure Time : 1/1000
F Number : 2.8
Exposure Program : Aperture-priority AE
ISO : 1000
Sensitivity Type : Recommended Exposure Index
Recommended Exposure Index : 1000
Exif Version : 0231
Date/Time Original : 2024:02:21 10:14:22
Create Date : 2024:02:21 10:14:22
Offset Time : -05:00
Offset Time Original : -05:30
Offset Time Digitized : -05:30
Shutter Speed Value : 1/1000
Aperture Value : 2.8
Exposure Compensation : +1/3
Max Aperture Value : 2.8
Metering Mode : Multi-segment
Flash : No Flash
Focal Length : 70.0 mm
Sub Sec Time Original : 27
Sub Sec Time Digitized : 27
Color Space : sRGB
Focal Plane X Resolution : 5773.079634
Focal Plane Y Resolution : 5769.799366
Focal Plane Resolution Unit : inches
Custom Rendered : Normal
Exposure Mode : Auto
White Balance : Auto
Scene Capture Type : Standard
Serial Number : 652459200412
Lens Info : 24-70mm f/?
Lens Model : RF24-70mm F2.8 L IS USM
Lens Serial Number : 7903000713
GPS Version ID : 2.2.0.0
GPS Latitude Ref : North
GPS Longitude Ref : West
Compression : JPEG (old-style)
Thumbnail Offset : 1100
Thumbnail Length : 7160
Displayed Units X : inches
Displayed Units Y : inches
Current IPTC Digest : a3bcd75f12c9310749772a8809879881
Coded Character Set : UTF8
Application Record Version : 4
Time Created : 10:14:22-05:30
Digital Creation Date : 2024:02:21
Digital Creation Time : 10:14:22-05:30
Province-State : Newfoundland and Labrador
Country-Primary Location Code : CA
Country-Primary Location Name : Canada
Caption-Abstract : Nunatsiavut Land
Photoshop Thumbnail : (Binary data 7160 bytes, use -b option to extract)
IPTC Digest : a3bcd75f12c9310749772a8809879881
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 Toolkit : Adobe XMP Core 7.0-c000 1.000000, 0000/00/00-00:00:00
Creator Tool : Adobe Photoshop Lightroom Classic 14.1 (Windows)
Metadata Date : 2024:12:19 12:17:32-05:00
Lens : RF24-70mm F2.8 L IS USM
Image Number : 0
Approximate Focus Distance : infinity
Flash Compensation : 0
Firmware : 1.0.5.1
Distortion Correction Already Applied: True
Lateral Chromatic Aberration Correction Already Applied: True
Vignette Correction Already Applied: True
Date Created : 2024:02:21 10:14:22.27-05:30
State : Newfoundland and Labrador
Country : Canada
Document ID : xmp.did:1e0376ed-632b-a14f-9fd5-c311943eaed7
Preserved File Name : IMG_2457.CR3
Original Document ID : C5B703C4A1F99D77267C59E82332CA77
Instance ID : xmp.iid:1e0376ed-632b-a14f-9fd5-c311943eaed7
Format : image/jpeg
Pick : 1
Good : true
Country Code : CA
Raw File Name : Nunatsiavut Land__IMG_2457.jpg
Version : 17.1
Process Version : 15.4
Incremental Temperature : 0
Incremental Tint : 0
Exposure 2012 : 0.00
Contrast 2012 : 0
Highlights 2012 : 0
Shadows 2012 : 0
Whites 2012 : 0
Blacks 2012 : 0
Texture : 0
Clarity 2012 : 0
Dehaze : 0
Vibrance : 0
Saturation : 0
Parametric Shadows : 0
Parametric Darks : 0
Parametric Lights : 0
Parametric Highlights : 0
Parametric Shadow Split : 25
Parametric Midtone Split : 50
Parametric Highlight Split : 75
Sharpness : 0
Luminance Smoothing : 0
Color Noise Reduction : 0
Hue Adjustment Red : 0
Hue Adjustment Orange : 0
Hue Adjustment Yellow : 0
Hue Adjustment Green : 0
Hue Adjustment Aqua : 0
Hue Adjustment Blue : 0
Hue Adjustment Purple : 0
Hue Adjustment Magenta : 0
Saturation Adjustment Red : 0
Saturation Adjustment Orange : 0
Saturation Adjustment Yellow : 0
Saturation Adjustment Green : 0
Saturation Adjustment Aqua : 0
Saturation Adjustment Blue : 0
Saturation Adjustment Purple : 0
Saturation Adjustment Magenta : 0
Luminance Adjustment Red : 0
Luminance Adjustment Orange : 0
Luminance Adjustment Yellow : 0
Luminance Adjustment Green : 0
Luminance Adjustment Aqua : 0
Luminance Adjustment Blue : 0
Luminance Adjustment Purple : 0
Luminance Adjustment Magenta : 0
Split Toning Shadow Hue : 0
Split Toning Shadow Saturation : 0
Split Toning Highlight Hue : 0
Split Toning Highlight Saturation: 0
Split Toning Balance : 0
Color Grade Midtone Hue : 0
Color Grade Midtone Sat : 0
Color Grade Shadow Lum : 0
Color Grade Midtone Lum : 0
Color Grade Highlight Lum : 0
Color Grade Blending : 50
Color Grade Global Hue : 0
Color Grade Global Sat : 0
Color Grade Global Lum : 0
Auto Lateral CA : 0
Lens Profile Enable : 0
Lens Manual Distortion Amount : 0
Vignette Amount : 0
Defringe Purple Amount : 0
Defringe Purple Hue Lo : 30
Defringe Purple Hue Hi : 70
Defringe Green Amount : 0
Defringe Green Hue Lo : 40
Defringe Green Hue Hi : 60
Perspective Upright : Off
Perspective Vertical : 0
Perspective Horizontal : 0
Perspective Rotate : 0.0
Perspective Aspect : 0
Perspective Scale : 100
Perspective X : 0.00
Perspective Y : 0.00
Grain Amount : 0
Post Crop Vignette Amount : 0
Shadow Tint : 0
Red Hue : 0
Red Saturation : 0
Green Hue : 0
Green Saturation : 0
Blue Hue : 0
Blue Saturation : 0
HDR Edit Mode : 0
Convert To Grayscale : False
Override Look Vignette : False
Tone Curve Name 2012 : Linear
Camera Profile : Embedded
Camera Profile Digest : 54650A341B5B5CCAE8442D0B43A92BCE
Has Settings : True
Crop Top : 0
Crop Left : 0
Crop Bottom : 1
Crop Right : 1
Crop Angle : 0
Crop Constrain To Warp : 0
Has Crop : False
Already Applied : True
History Action : derived, saved, derived, saved
History Parameters : converted from image/x-canon-cr3 to image/jpeg, saved to new location, saved to new location
History Instance ID : xmp.iid:37d3cffa-e26a-e348-bf7a-d0431fd685e7, xmp.iid:1e0376ed-632b-a14f-9fd5-c311943eaed7
History When : 2024:03:12 12:13:49-04:00, 2024:12:19 12:17:32-05:00
History Software Agent : Adobe Photoshop Lightroom Classic 13.2 (Windows), Adobe Photoshop Lightroom Classic 14.1 (Windows)
History Changed : /, /
Derived From Instance ID : xmp.iid:37d3cffa-e26a-e348-bf7a-d0431fd685e7
Derived From Document ID : xmp.did:37d3cffa-e26a-e348-bf7a-d0431fd685e7
Derived From Original Document ID: C5B703C4A1F99D77267C59E82332CA77
Description : Nunatsiavut Land
Tone Curve PV2012 : 0, 0, 255, 255
Tone Curve PV2012 Red : 0, 0, 255, 255
Tone Curve PV2012 Green : 0, 0, 255, 255
Tone Curve PV2012 Blue : 0, 0, 255, 255
Point Colors : -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000, -1.000000
DCT Encode Version : 100
APP14 Flags 0 : [14], Encoded with Blend=1 downsampling
APP14 Flags 1 : (none)
Color Transform : YCbCr
Image Width : 8192
Image Height : 5464
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:4:4 (1 1)
Aperture : 2.8
Image Size : 8192x5464
Megapixels : 44.8
Scale Factor To 35 mm Equivalent: 1.0
Shutter Speed : 1/1000
Create Date : 2024:02:21 10:14:22.27-05:30
Date/Time Original : 2024:02:21 10:14:22.27-05:30
Modify Date : 2024:12:19 12:17:32-05:00
Thumbnail Image : (Binary data 7160 bytes, use -b option to extract)
GPS Latitude : 54 deg 42' 49.60" N
GPS Longitude : 61 deg 3' 26.68" W
Date/Time Created : 2024:02:21 10:14:22-05:30
Digital Creation Date/Time : 2024:02:21 10:14:22-05:30
Circle Of Confusion : 0.030 mm
Depth Of Field : inf (58.16 m - inf)
Field Of View : 28.9 deg
Focal Length : 70.0 mm (35 mm equivalent: 69.9 mm)
GPS Position : 54 deg 42' 49.60" N, 61 deg 3' 26.68" W
Hyperfocal Distance : 58.16 m
Light Value : 9.6
Lens ID : Canon RF 24-70mm F2.8L IS USM
-- press ENTER --

@bo0tzz
Copy link
Member

bo0tzz commented Dec 20, 2024

Have all the background jobs finished running? Can you share one of these files in a .zip?

@oflaki
Copy link
Author

oflaki commented Dec 20, 2024

Yes, all background jobs finished running etc.

date_time_issue.zip

@nathangur
Copy link

I have over 30,000 photos and videos spanning around 21 years and I am having the same issue where immich is using the date modified instead of the date created for large batches of photos, making my library absolutely messed up with photos from 2007 appearing in 2018.

@oflaki
Copy link
Author

oflaki commented Dec 24, 2024

@nathangur good to hear that I'm not alone... It sounds like we have a similiar/same issue. I didn't have this issues in the past. I previously had a large amount of images being imported through external libraries all showing up with the correct time/date. I've recently changed my approach, from using external libraries (deleting them from immich first) to importing them directly into immich. And now some of these images are being sorted by modification time/date vs Original time/date.

@grahamkent
Copy link

I'm also seeing this. I imported a year's worth of photos and Immich is using the OS modified file timestamp to sort the images even though EXIF data contains an accurate File Creation Date/Time entry.

@oflaki
Copy link
Author

oflaki commented Dec 27, 2024

@grahamkent , is this happening to ALL your media? Or only a portion of it?
I get a mix of both.

@alextran1502
Copy link
Contributor

@oflaki How did you importing your media to Immich, from using the Immich CLI or immich-go?

@oflaki
Copy link
Author

oflaki commented Dec 28, 2024

Hi @alextran1502 !
I haven't used either Immich CLI or immich-go.
The media was previously imported via External Libraries months ago - which was all perfectly well catalogued.
I then decided to change my approach recently, and use Lighroom Immich plugin. I deleted the external library, and uploaded the selection of media through the Lightroom Immich plugin, and getting some media catalogued under Modification DateTime, and some media under DateTime Original.
I then deleted the images uploaded through the plugin (and emptied the trash), and uploaded a selection of media through the browser instead (drag and drop), and am getting the exact same issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants