Wrong Timezone for uploaded assets #6330

Closed
opened 2026-02-05 12:12:27 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @Demian98 on GitHub (Jun 21, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

When uploading assets without EXIF metadata, Immich ignores the time zone information provided in the fileCreatedAt and fileModifiedAt fields. The timestamp is always interpreted as UTC, even if a time zone offset is present in the string.

This results in incorrect display times (e.g. shifted by -2 hours for Germany) when uploading files with ISO 8601 timestamps like: 2025-06-21T16:53:24.000+02:00

Example for the above timestamp:
Image

This issue occurs both via the API and the web interface.

Important note:

  • EXIF metadata (if present) correctly overrides the timestamp. So this needs to be tested with images without EXIF metadata (WhatApp images or screenshots).

The OS that Immich Server is running on

Ubuntu Linux 24.04.2

Version of Immich Server

v1.135.3

Version of Immich Mobile App

v1.135.3

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

#
# WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose
#
# 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-test

services:
  immich-server:
    container_name: immich_test_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
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - '2284:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_test_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] 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, rocm, openvino, openvino-wsl, rknn] 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_test_redis
    image: docker.io/valkey/valkey:8-bookworm@sha256:ff21bc0f8194dc9c105b769aeabf9585fea6a8ed649c0781caeac5cb3c247884
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_test_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0@sha256:fa4f6e0971f454cd95fec5a9aaed2ed93d8f46725cc6bc61e0698e97dba96da1
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
      # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
      # DB_STORAGE_TYPE: 'HDD'
    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
    restart: always



  immich-sftp:
    container_name: immich_test_sftp
    image: immich-sftp-server:1.4
    ports:
      - "22842:22"  # Expose SFTP on standard port
    environment:
      IMMICH_HOST: http://immich-server:2283
    restart: unless-stopped

volumes:
  data:
    external: true
    name: 'immich-test_data'
  database:
    external: true
    name: 'immich-test_database'
  model-cache:
    external: true
    name: 'immich-test_model-cache'

Your .env content

UPLOAD_LOCATION=data
DB_DATA_LOCATION=database
TZ=Europe/Berlin
IMMICH_VERSION=v1.135.3
DB_PASSWORD=---
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

  1. Upload an asset without EXIF data (API or Web)
  2. Check the date time in the file info in Immich

Relevant log output


Additional information

Not tested on mobile, assume it is the same issue there.

Originally created by @Demian98 on GitHub (Jun 21, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug When uploading assets without EXIF metadata, Immich ignores the time zone information provided in the `fileCreatedAt` and `fileModifiedAt` fields. The timestamp is always interpreted as UTC, even if a time zone offset is present in the string. This results in incorrect display times (e.g. shifted by -2 hours for Germany) when uploading files with ISO 8601 timestamps like: `2025-06-21T16:53:24.000+02:00` Example for the above timestamp: ![Image](https://github.com/user-attachments/assets/f1cc3ef4-9826-4c61-9e1e-9a8a92faff06) This issue occurs both via the **API** and the **web interface**. Important note: - EXIF metadata (if present) correctly overrides the timestamp. So this needs to be tested with images without EXIF metadata (WhatApp images or screenshots). ### The OS that Immich Server is running on Ubuntu Linux 24.04.2 ### Version of Immich Server v1.135.3 ### Version of Immich Mobile App v1.135.3 ### Platform with the issue - [x] Server - [x] Web - [x] Mobile ### Your docker-compose.yml content ```YAML # # WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose # # 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-test services: immich-server: container_name: immich_test_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 - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - '2284:2283' depends_on: - redis - database restart: always healthcheck: disable: false immich-machine-learning: container_name: immich_test_machine_learning # For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] 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, rocm, openvino, openvino-wsl, rknn] 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_test_redis image: docker.io/valkey/valkey:8-bookworm@sha256:ff21bc0f8194dc9c105b769aeabf9585fea6a8ed649c0781caeac5cb3c247884 healthcheck: test: redis-cli ping || exit 1 restart: always database: container_name: immich_test_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0@sha256:fa4f6e0971f454cd95fec5a9aaed2ed93d8f46725cc6bc61e0698e97dba96da1 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' # Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs # DB_STORAGE_TYPE: 'HDD' 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 restart: always immich-sftp: container_name: immich_test_sftp image: immich-sftp-server:1.4 ports: - "22842:22" # Expose SFTP on standard port environment: IMMICH_HOST: http://immich-server:2283 restart: unless-stopped volumes: data: external: true name: 'immich-test_data' database: external: true name: 'immich-test_database' model-cache: external: true name: 'immich-test_model-cache' ``` ### Your .env content ```Shell UPLOAD_LOCATION=data DB_DATA_LOCATION=database TZ=Europe/Berlin IMMICH_VERSION=v1.135.3 DB_PASSWORD=--- DB_USERNAME=postgres DB_DATABASE_NAME=immich ``` ### Reproduction steps 1. Upload an asset without EXIF data (API or Web) 2. Check the date time in the file info in Immich ### Relevant log output ```shell ``` ### Additional information Not tested on mobile, assume it is the same issue there.
Author
Owner

@danieldietzler commented on GitHub (Jun 21, 2025):

#12650

@danieldietzler commented on GitHub (Jun 21, 2025): #12650
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#6330