Issue with exif date with +0000 #4802

Open
opened 2026-02-20 03:10:35 -05:00 by deekerman · 8 comments
Owner

Originally created by @chaletweb on GitHub (Jan 28, 2025).

The bug

When Exif info are :
Modify Date : 2025:01:14 18:31:30+0000
Date/Time Original : 2025:01:14 18:31:30+0000
Create Date : 2025:01:14 18:31:30+0000

With +0000

The Date time is wrong 21 Jan. 2025 instead of 14 Jan. 2025

This image providing from an external library

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.125.6

Version of Immich Mobile App

1.125.3

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# 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}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - //srv/dev-disk-by-uuid-c177af99-2091-4ea1-a3af-9993f84d110a/Photos:/mnt/media/Photos
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  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:
      - stack.env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:905c4ee67b8e0aa955331960d2aa745781e6bd89afc44a8584bfd13bc890f0ae

    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: >-
        pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1;
        Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align
        --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')";
        echo "checksum failure count is $$Chksum";
        [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command: >-
      postgres
      -c shared_preload_libraries=vectors.so
      -c 'search_path="$$user", public, vectors'
      -c logging_collector=on
      -c max_wal_size=2GB
      -c shared_buffers=512MB
      -c wal_compression=on
    restart: always

volumes:
  model-cache:

Your .env content

UPLOAD_LOCATION=//srv/dev-disk-by-uuid-c177af99-2091-4ea1-a3af-9993f84d110a/appdatas/immich/library
DB_DATA_LOCATION=//srv/dev-disk-by-uuid-c177af99-2091-4ea1-a3af-9993f84d110a/appdatas/immich/postgres
IMMICH_VERSION=release
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
TZ=Europe/Paris

Reproduction steps

  1. Refresh metadata with a file with +0000 at the end of the Date/Time Original

Relevant log output


Additional information

No response

Originally created by @chaletweb on GitHub (Jan 28, 2025). ### The bug When Exif info are : Modify Date : 2025:01:14 18:31:30+0000 Date/Time Original : 2025:01:14 18:31:30+0000 Create Date : 2025:01:14 18:31:30+0000 With +0000 The Date time is wrong 21 Jan. 2025 instead of 14 Jan. 2025 This image providing from an external library ### The OS that Immich Server is running on Debian ### Version of Immich Server v1.125.6 ### Version of Immich Mobile App 1.125.3 ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML # # 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} # extends: # file: hwaccel.transcoding.yml # service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding volumes: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file - ${UPLOAD_LOCATION}:/usr/src/app/upload - //srv/dev-disk-by-uuid-c177af99-2091-4ea1-a3af-9993f84d110a/Photos:/mnt/media/Photos - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - '2283:2283' depends_on: - redis - database restart: always healthcheck: disable: false 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: - stack.env restart: always healthcheck: disable: false redis: container_name: immich_redis image: docker.io/redis:6.2-alpine@sha256:905c4ee67b8e0aa955331960d2aa745781e6bd89afc44a8584bfd13bc890f0ae healthcheck: test: redis-cli ping || exit 1 restart: always database: container_name: immich_postgres image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' volumes: # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file - ${DB_DATA_LOCATION}:/var/lib/postgresql/data healthcheck: test: >- pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" || exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1 interval: 5m start_interval: 30s start_period: 5m command: >- postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on restart: always volumes: model-cache: ``` ### Your .env content ```Shell UPLOAD_LOCATION=//srv/dev-disk-by-uuid-c177af99-2091-4ea1-a3af-9993f84d110a/appdatas/immich/library DB_DATA_LOCATION=//srv/dev-disk-by-uuid-c177af99-2091-4ea1-a3af-9993f84d110a/appdatas/immich/postgres IMMICH_VERSION=release DB_PASSWORD=postgres DB_USERNAME=postgres DB_DATABASE_NAME=immich TZ=Europe/Paris ``` ### Reproduction steps 1. Refresh metadata with a file with +0000 at the end of the Date/Time Original ### Relevant log output ```shell ``` ### Additional information _No response_
Author
Owner

@alextran1502 commented on GitHub (Jan 28, 2025):

+0000 is an invalid timezone format

@alextran1502 commented on GitHub (Jan 28, 2025): +0000 is an invalid timezone format
Author
Owner

@alextran1502 commented on GitHub (Jan 28, 2025):

You can also attach the problematic file and we can try to troubleshoot

@alextran1502 commented on GitHub (Jan 28, 2025): You can also attach the problematic file and we can try to troubleshoot
Author
Owner

@chaletweb commented on GitHub (Jan 29, 2025):

I know but a good behavior. Could be set the default timezone instead of put a false datetime. No ?
Other photo manager can retrieve the good date with the same photo (nextcloud, memories, photoprism)

@chaletweb commented on GitHub (Jan 29, 2025): I know but a good behavior. Could be set the default timezone instead of put a false datetime. No ? Other photo manager can retrieve the good date with the same photo (nextcloud, memories, photoprism)
Author
Owner

@alextran1502 commented on GitHub (Jan 29, 2025):

Can you attach the file?

@alextran1502 commented on GitHub (Jan 29, 2025): Can you attach the file?
Author
Owner

@chaletweb commented on GitHub (Jan 29, 2025):

Image

with exiftool we have this data :
exiftool IMG-20250108-WA0000.jpg
ExifTool Version Number : 12.70
File Name : IMG-20250108-WA0000.jpg
Directory : .
File Size : 302 kB
File Modification Date/Time : 2025:01:29 20:46:19+01:00
File Access Date/Time : 2025:01:29 20:47:00+01:00
File Inode Change Date/Time : 2025:01:29 20:46:19+01:00
File Permissions : -rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
JFIF Version : 1.01
Exif Byte Order : Big-endian (Motorola, MM)
X Resolution : 1
Y Resolution : 1
Resolution Unit : None
Modify Date : 2025:01:08 07:18:55+0000
Y Cb Cr Positioning : Centered
Exif Version : 0232
Date/Time Original : 2025:01:08 07:18:55+0000
Create Date : 2025:01:08 07:18:55+0000
Components Configuration : Y, Cb, Cr, -
Flashpix Version : 0100
Color Space : Uncalibrated
Image Width : 2048
Image Height : 1533
Encoding Process : Progressive DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 2048x1533
Megapixels : 3.1

And on immich :

Image

@chaletweb commented on GitHub (Jan 29, 2025): ![Image](https://github.com/user-attachments/assets/0f136d73-e4a4-4d87-8e7e-5cd00a8389c4) with exiftool we have this data : exiftool IMG-20250108-WA0000.jpg ExifTool Version Number : 12.70 File Name : IMG-20250108-WA0000.jpg Directory : . File Size : 302 kB File Modification Date/Time : 2025:01:29 20:46:19+01:00 File Access Date/Time : 2025:01:29 20:47:00+01:00 File Inode Change Date/Time : 2025:01:29 20:46:19+01:00 File Permissions : -rw-r--r-- File Type : JPEG File Type Extension : jpg MIME Type : image/jpeg JFIF Version : 1.01 Exif Byte Order : Big-endian (Motorola, MM) X Resolution : 1 Y Resolution : 1 Resolution Unit : None Modify Date : 2025:01:08 07:18:55+0000 Y Cb Cr Positioning : Centered Exif Version : 0232 Date/Time Original : 2025:01:08 07:18:55+0000 Create Date : 2025:01:08 07:18:55+0000 Components Configuration : Y, Cb, Cr, - Flashpix Version : 0100 Color Space : Uncalibrated Image Width : 2048 Image Height : 1533 Encoding Process : Progressive DCT, Huffman coding Bits Per Sample : 8 Color Components : 3 Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2) Image Size : 2048x1533 Megapixels : 3.1 And on immich : ![Image](https://github.com/user-attachments/assets/9f9a58bb-8bee-4fde-b038-202c351e4435)
Author
Owner

@alextran1502 commented on GitHub (Jan 29, 2025):

Can you help zip the file up so I have the original file please?

@alextran1502 commented on GitHub (Jan 29, 2025): Can you help zip the file up so I have the original file please?
Author
Owner

@chaletweb commented on GitHub (Jan 29, 2025):

IMG-20250108-WA0000.zip
sure.

@chaletweb commented on GitHub (Jan 29, 2025): [IMG-20250108-WA0000.zip](https://github.com/user-attachments/files/18594516/IMG-20250108-WA0000.zip) sure.
Author
Owner

@skatsubo commented on GitHub (Dec 9, 2025):

Just confirming that +0000 breaks parsing/extraction of datetime:

VERBOSE [Microservices:MetadataService] Exif Tags
VERBOSE [Microservices:MetadataService] Object(35) {
  ...
  FileModifyDate: ExifDateTime {
    year: 2025,
    month: 1,
    day: 29,
    hour: 19,
    minute: 46,
    second: 19,
    millisecond: undefined,
    tzoffsetMinutes: 0,
    rawValue: '2025:01:29 19:46:19Z',
    zoneName: 'UTC',
    inferredZone: false,
    zone: 'UTC'
  },
  ...
  CreateDate: '2025:01:08 07:18:55+0000',
  DateTimeOriginal: '2025:01:08 07:18:55+0000',
  ModifyDate: '2025:01:08 07:18:55+0000',
  warnings: []
}
VERBOSE [Microservices:MetadataService] Date and time is undefined using exifTag undefined for asset 8ed4a910-b9cb-4f75-8061-22bdf4adbd81: /data/upload/ff5e354e-34fa-4d25-9093-ac372ff14a43/b9/f6/b9f65e03-7411-4848-a12a-47900a3fffbb.jpg
  DEBUG [Microservices:MetadataService] No timezone information found for asset 8ed4a910-b9cb-4f75-8061-22bdf4adbd81: /data/upload/ff5e354e-34fa-4d25-9093-ac372ff14a43/b9/f6/b9f65e03-7411-4848-a12a-47900a3fffbb.jpg
  DEBUG [Microservices:MetadataService] No exif date time found, falling back on 2025-01-29T19:46:19.000+00:00, earliest of file creation and modification for asset 8ed4a910-b9cb-4f75-8061-22bdf4adbd81: /data/upload/ff5e354e-34fa-4d25-9093-ac372ff14a43/b9/f6/b9f65e03-7411-4848-a12a-47900a3fffbb.jpg
@skatsubo commented on GitHub (Dec 9, 2025): Just confirming that `+0000` breaks parsing/extraction of datetime: ``` VERBOSE [Microservices:MetadataService] Exif Tags VERBOSE [Microservices:MetadataService] Object(35) { ... FileModifyDate: ExifDateTime { year: 2025, month: 1, day: 29, hour: 19, minute: 46, second: 19, millisecond: undefined, tzoffsetMinutes: 0, rawValue: '2025:01:29 19:46:19Z', zoneName: 'UTC', inferredZone: false, zone: 'UTC' }, ... CreateDate: '2025:01:08 07:18:55+0000', DateTimeOriginal: '2025:01:08 07:18:55+0000', ModifyDate: '2025:01:08 07:18:55+0000', warnings: [] } VERBOSE [Microservices:MetadataService] Date and time is undefined using exifTag undefined for asset 8ed4a910-b9cb-4f75-8061-22bdf4adbd81: /data/upload/ff5e354e-34fa-4d25-9093-ac372ff14a43/b9/f6/b9f65e03-7411-4848-a12a-47900a3fffbb.jpg DEBUG [Microservices:MetadataService] No timezone information found for asset 8ed4a910-b9cb-4f75-8061-22bdf4adbd81: /data/upload/ff5e354e-34fa-4d25-9093-ac372ff14a43/b9/f6/b9f65e03-7411-4848-a12a-47900a3fffbb.jpg DEBUG [Microservices:MetadataService] No exif date time found, falling back on 2025-01-29T19:46:19.000+00:00, earliest of file creation and modification for asset 8ed4a910-b9cb-4f75-8061-22bdf4adbd81: /data/upload/ff5e354e-34fa-4d25-9093-ac372ff14a43/b9/f6/b9f65e03-7411-4848-a12a-47900a3fffbb.jpg ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#4802
No description provided.