Wrong date on photos from external libraries #2856

Closed
opened 2026-02-05 07:07:20 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @jeanpaulrh on GitHub (Apr 11, 2024).

The bug

I have a bunch of photos imported through the years from my phone. I know data could be inconsistent, but I noticed a strange behaviour on photos that have for me the correct exif data but are shown in a wrong position in the timeline.

The OS that Immich Server is running on

Debian 12

Version of Immich Server

v1.101.0

Version of Immich Mobile App

latest

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}
    command: ['start.sh', 'immich']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/storage/pictures:/mnt/pictures:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    command: ['start.sh', 'microservices']
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      - /mnt/storage/pictures:/mnt/pictures:ro
    env_file:
      - .env
    depends_on:
      - redis
      - database
    restart: always
  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always

  redis:
    container_name: immich_redis
    image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5
    restart: always


  database:
    container_name: immich_postgres
    image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  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=./library

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

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

# The values below this line do not need to be changed
###################################################################################
DB_HOSTNAME=immich_postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

REDIS_HOSTNAME=immich_redis

Reproduction steps

1. Import data from an external library
2. look for the photos in the timeline
3. file modification time is used instead of exif data
...

Additional information

This is exif data for the foto

--------------------+----------------------------------------------------------
Tag                 |Value
--------------------+----------------------------------------------------------
Manufacturer        |Apple
Model               |iPhone 5
Orientation         |Top-left
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Software            |8.2
Date and Time       |2015:04:25 11:23:06
YCbCr Positioning   |Centered
Compression         |JPEG compression
X-Resolution        |72
Y-Resolution        |72
Resolution Unit     |Inch
Exposure Time       |1/1355 sec.
F-Number            |f/2.4
Exposure Program    |Normal program
ISO Speed Ratings   |50
Exif Version        |Exif Version 2.21
Date and Time (Origi|2015:04:25 11:23:06
Date and Time (Digit|2015:04:25 11:23:06
Components Configura|Y Cb Cr -
Shutter Speed       |10.40 EV (1/1355 sec.)
Aperture            |2.53 EV (f/2.4)
Brightness          |10.01 EV (3540.07 cd/m^2)
Exposure Bias       |0.00 EV
Metering Mode       |Pattern
Flash               |Flash did not fire, compulsory flash mode
Focal Length        |4.1 mm
Subject Area        |Within rectangle (width 1795, height 1077) around (x,y) = 
Maker Note          |232 bytes undefined data
Sub-second Time (Ori|927
Sub-second Time (Dig|927
FlashPixVersion     |FlashPix Version 1.0
Color Space         |sRGB
Pixel X Dimension   |3264
Pixel Y Dimension   |2448
Sensing Method      |One-chip color area sensor
Scene Type          |Directly photographed
Exposure Mode       |Auto exposure
White Balance       |Auto white balance
Focal Length in 35mm|33
Scene Capture Type  |Standard
Lens Specification  |4.12, 4.12, 2.4, 2.4
Lens Make           |Apple
Lens Model          |iPhone 5 back camera 4.12mm f/2.4
North or South Latit|N
Latitude            |45, 28, 15.09
East or West Longitu|E
Longitude           |10, 32, 25.07
Altitude Reference  |Sea level
Altitude            |68.006
GPS Time (Atomic Clo|09:23:06.06
Speed Unit          |K
Speed of GPS Receive| 0
GPS Image Direction |T
GPS Image Direction |266.051
Reference for Bearin|T
Bearing of Destinati|86.051
GPS Date            |2015:04:25
--------------------+----------------------------------------------------------
EXIF data contains a thumbnail (10874 bytes).

This is file attributes:

gianpaolo@docker-vm:/var/lib/docker-data/immich-app$ ls -l  /mnt/storage/pictures/PlexUpload/Foto\ iPhone/iPhone\ di\ Gianpaolo/2015/04/2015-04-25\ 11.23.06.JPG 
-rwxrwxr-x 1 gianpaolo users 2256362 Jun 20  2022 '/mnt/storage/pictures/PlexUpload/Foto iPhone/iPhone di Gianpaolo/2015/04/2015-04-25 11.23.06.JPG'

The foto is placed in the timeline in year 2022 month june and day 20, which is wrong to me.

Originally created by @jeanpaulrh on GitHub (Apr 11, 2024). ### The bug I have a bunch of photos imported through the years from my phone. I know data could be inconsistent, but I noticed a strange behaviour on photos that have for me the correct exif data but are shown in a wrong position in the timeline. ### The OS that Immich Server is running on Debian 12 ### Version of Immich Server v1.101.0 ### Version of Immich Mobile App latest ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML 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} command: ['start.sh', 'immich'] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - /mnt/storage/pictures:/mnt/pictures:ro env_file: - .env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/hardware-transcoding # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding command: ['start.sh', 'microservices'] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro - /mnt/storage/pictures:/mnt/pictures:ro env_file: - .env depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag. # Example tag: ${IMMICH_VERSION:-release}-cuda image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration # file: hwaccel.ml.yml # service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable volumes: - model-cache:/cache env_file: - .env restart: always redis: container_name: immich_redis image: registry.hub.docker.com/library/redis:6.2-alpine@sha256:51d6c56749a4243096327e3fb964a48ed92254357108449cb6e23999c37773c5 restart: always database: container_name: immich_postgres image: registry.hub.docker.com/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell # 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=./library # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password DB_PASSWORD=mysecretpassword # The values below this line do not need to be changed ################################################################################### DB_HOSTNAME=immich_postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich REDIS_HOSTNAME=immich_redis ``` ### Reproduction steps ```bash 1. Import data from an external library 2. look for the photos in the timeline 3. file modification time is used instead of exif data ... ``` ### Additional information This is exif data for the foto ```EXIF tags in '/mnt/storage/pictures/PlexUpload/Foto iPhone/iPhone di Gianpaolo/2015/04/2015-04-25 11.23.06.JPG' ('Motorola' byte order): --------------------+---------------------------------------------------------- Tag |Value --------------------+---------------------------------------------------------- Manufacturer |Apple Model |iPhone 5 Orientation |Top-left X-Resolution |72 Y-Resolution |72 Resolution Unit |Inch Software |8.2 Date and Time |2015:04:25 11:23:06 YCbCr Positioning |Centered Compression |JPEG compression X-Resolution |72 Y-Resolution |72 Resolution Unit |Inch Exposure Time |1/1355 sec. F-Number |f/2.4 Exposure Program |Normal program ISO Speed Ratings |50 Exif Version |Exif Version 2.21 Date and Time (Origi|2015:04:25 11:23:06 Date and Time (Digit|2015:04:25 11:23:06 Components Configura|Y Cb Cr - Shutter Speed |10.40 EV (1/1355 sec.) Aperture |2.53 EV (f/2.4) Brightness |10.01 EV (3540.07 cd/m^2) Exposure Bias |0.00 EV Metering Mode |Pattern Flash |Flash did not fire, compulsory flash mode Focal Length |4.1 mm Subject Area |Within rectangle (width 1795, height 1077) around (x,y) = Maker Note |232 bytes undefined data Sub-second Time (Ori|927 Sub-second Time (Dig|927 FlashPixVersion |FlashPix Version 1.0 Color Space |sRGB Pixel X Dimension |3264 Pixel Y Dimension |2448 Sensing Method |One-chip color area sensor Scene Type |Directly photographed Exposure Mode |Auto exposure White Balance |Auto white balance Focal Length in 35mm|33 Scene Capture Type |Standard Lens Specification |4.12, 4.12, 2.4, 2.4 Lens Make |Apple Lens Model |iPhone 5 back camera 4.12mm f/2.4 North or South Latit|N Latitude |45, 28, 15.09 East or West Longitu|E Longitude |10, 32, 25.07 Altitude Reference |Sea level Altitude |68.006 GPS Time (Atomic Clo|09:23:06.06 Speed Unit |K Speed of GPS Receive| 0 GPS Image Direction |T GPS Image Direction |266.051 Reference for Bearin|T Bearing of Destinati|86.051 GPS Date |2015:04:25 --------------------+---------------------------------------------------------- EXIF data contains a thumbnail (10874 bytes). ``` This is file attributes: ``` gianpaolo@docker-vm:/var/lib/docker-data/immich-app$ ls -l /mnt/storage/pictures/PlexUpload/Foto\ iPhone/iPhone\ di\ Gianpaolo/2015/04/2015-04-25\ 11.23.06.JPG -rwxrwxr-x 1 gianpaolo users 2256362 Jun 20 2022 '/mnt/storage/pictures/PlexUpload/Foto iPhone/iPhone di Gianpaolo/2015/04/2015-04-25 11.23.06.JPG' ``` The foto is placed in the timeline in year 2022 month june and day 20, which is wrong to me.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#2856