[BUG] DST ignored when backing up from mobile #1794

Closed
opened 2026-02-05 03:49:46 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @pig-cop on GitHub (Dec 16, 2023).

The bug

In my country we set the time one hour back due to DST some weeks ago.
Since then the mobile app continued to apply the time without considering this, so every photo is uploaded one hour in the future.
If I check the metadata from the Immich mobile app before it gets uploaded on the server the time is correct (DST applied) but as soon as it is backed up the time goes one hour ahead.
The result is the photos are uploaded normally and appear in the Recents section or Search but they will not show up in the gallery homepage (Today section) until the time catches up, so one hour later in my case.

The OS that Immich Server is running on

Debian

Version of Immich Server

v1.91.0

Version of Immich Mobile App

v1.91.0 build.115

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

version: "3.8"

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${TAG}
    command: [ "start.sh", "immich" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always

  immich-microservices:
    container_name: immich_microservices
    image: ghcr.io/immich-app/immich-server:${TAG}
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    depends_on:
      - redis
      - database
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2
    restart: always

  database:
    container_name: immich_postgres
    image: tensorchord/pgvecto-rs:pg14-v0.1.11
    env_file:
      - stack.env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      PG_DATA: /var/lib/postgresql/data
    volumes:
      - pgdata:/var/lib/postgresql/data
    restart: always

volumes:
  pgdata:
  model-cache:

Your .env content

---

Reproduction steps

1. Take a photo in a country with DST
2. Check the metadata > it has the correct time
3. Photo gets uploaded > DST is ignored and wrong time is applied

Additional information

No response

Originally created by @pig-cop on GitHub (Dec 16, 2023). ### The bug In my country we set the time one hour back due to DST some weeks ago. Since then the mobile app continued to apply the time without considering this, so every photo is uploaded one hour in the future. If I check the metadata from the Immich mobile app before it gets uploaded on the server the time is correct (DST applied) but as soon as it is backed up the time goes one hour ahead. The result is the photos are uploaded normally and appear in the Recents section or Search but they will not show up in the gallery homepage (Today section) until the time catches up, so one hour later in my case. ### The OS that Immich Server is running on Debian ### Version of Immich Server v1.91.0 ### Version of Immich Mobile App v1.91.0 build.115 ### Platform with the issue - [ ] Server - [X] Web - [X] Mobile ### Your docker-compose.yml content ```YAML version: "3.8" services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${TAG} command: [ "start.sh", "immich" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - 2283:3001 depends_on: - redis - database restart: always immich-microservices: container_name: immich_microservices image: ghcr.io/immich-app/immich-server:${TAG} command: [ "start.sh", "microservices" ] volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro env_file: - stack.env depends_on: - redis - database restart: always redis: container_name: immich_redis image: redis:6.2 restart: always database: container_name: immich_postgres image: tensorchord/pgvecto-rs:pg14-v0.1.11 env_file: - stack.env environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} PG_DATA: /var/lib/postgresql/data volumes: - pgdata:/var/lib/postgresql/data restart: always volumes: pgdata: model-cache: ``` ### Your .env content ```Shell --- ``` ### Reproduction steps ```bash 1. Take a photo in a country with DST 2. Check the metadata > it has the correct time 3. Photo gets uploaded > DST is ignored and wrong time is applied ``` ### Additional information _No response_
OVERLORD added the 📱mobiledate-time labels 2026-02-05 03:49:46 +03:00
Author
Owner

@pig-cop commented on GitHub (Dec 18, 2023):

I'm not entirely sure the issue is with DST.
I'll attach a more detailed example on what is happening.

IMG_20231218_141031

This is an actual photo where metadata can be inspected


Screenshot_2023-12-18-14-10-52-353_com simplemobiletools gallery pro-edit

The metadata, showing the correct time of when the photo was taken: 14:10


Screenshot_2023-12-18-14-11-39-922_app alextran immich

Immich showing the correct time (and timezone: GMT+1) before uploading to the server.


Screenshot_2023-12-18-14-13-12-225_app alextran immich-edit

This is what happens as soon as the photo is uploaded. The time will be set one hour ahead.

@pig-cop commented on GitHub (Dec 18, 2023): I'm not entirely sure the issue is with DST. I'll attach a more detailed example on what is happening. ![IMG_20231218_141031](https://github.com/immich-app/immich/assets/1793444/c79b321b-9432-4aa8-8811-e565ca8fb0b2) ### This is an actual photo where metadata can be inspected --- ![Screenshot_2023-12-18-14-10-52-353_com simplemobiletools gallery pro-edit](https://github.com/immich-app/immich/assets/1793444/670447fb-6977-42d5-9790-d41df93b3113) ### The metadata, showing the correct time of when the photo was taken: 14:10 --- ![Screenshot_2023-12-18-14-11-39-922_app alextran immich](https://github.com/immich-app/immich/assets/1793444/63ac68a1-cbc7-4a48-a4d6-7e0b1ef20493) ### Immich showing the correct time (and timezone: GMT+1) before uploading to the server. --- ![Screenshot_2023-12-18-14-13-12-225_app alextran immich-edit](https://github.com/immich-app/immich/assets/1793444/a70dc1f0-35da-42b2-90f3-fa4ff86a4ddb) ### This is what happens as soon as the photo is uploaded. The time will be set one hour ahead.
Author
Owner

@alextran1502 commented on GitHub (Dec 18, 2023):

is the time shown on the web correct?

@alextran1502 commented on GitHub (Dec 18, 2023): is the time shown on the web correct?
Author
Owner

@pig-cop commented on GitHub (Dec 18, 2023):

No, the time is exactly as shown on mobile after it gets uploaded.
And the main issue is that the photo will appear on the web only after one hour, when the time catches up with the wrong time.
I guess the "Today" section of the Photos page checks the current time to decide what to show there.
But the photo is uploaded and can be found in Search or in the Most Recent category.

Screenshot 2023-12-18 at 16-44-47 Photos

@pig-cop commented on GitHub (Dec 18, 2023): No, the time is exactly as shown on mobile after it gets uploaded. And the main issue is that the photo will appear on the web only after one hour, when the time catches up with the wrong time. I guess the "Today" section of the Photos page checks the current time to decide what to show there. But the photo is uploaded and can be found in Search or in the Most Recent category. ![Screenshot 2023-12-18 at 16-44-47 Photos](https://github.com/immich-app/immich/assets/1793444/0301caa3-1bff-42b3-87a3-e7d23403cb4f)
Author
Owner

@C-Otto commented on GitHub (Jan 25, 2025):

Which time zone (TZ) did you configure in your Docker "env"?

@C-Otto commented on GitHub (Jan 25, 2025): Which time zone (TZ) did you configure in your Docker "env"?
Author
Owner

@C-Otto commented on GitHub (Jan 25, 2025):

The example file does not have any time zone information. Older versions of Immich (this issue is rather old) tried to add a time zone in these situations, more recent versions don't do that anymore. Could you try refreshing the file's metadata (or re-uploading it after deleting it and removing it from trash)?

@C-Otto commented on GitHub (Jan 25, 2025): The example file does not have any time zone information. Older versions of Immich (this issue is rather old) tried to add a time zone in these situations, more recent versions don't do that anymore. Could you try refreshing the file's metadata (or re-uploading it after deleting it and removing it from trash)?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#1794