immich-app / immich

High performance self-hosted photo and video management solution.
https://immich.app
GNU Affero General Public License v3.0
44.63k stars 2.17k forks source link

[BUG] Immich memories showing photos from the wrong day #5877

Closed Milkysunshine closed 1 week ago

Milkysunshine commented 8 months ago

The bug

Looking at my memories, any pictures taken after 7pm on a day, show up in the next day's memories.

My timezone is America/New_York, so currently GMT-5

The OS that Immich Server is running on

debian bookworm

Version of Immich Server

latest

Version of Immich Mobile App

latest

Platform with the issue

Your docker-compose.yml content

version: "3.8"

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
    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:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.yml
    #   service: hwaccel
    command: [ "start.sh", "microservices" ]
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
    env_file:
      - stack.env
    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:
      - /docker/immich/model-cache:/cache
    env_file:
      - stack.env
    restart: always

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always
    volumes:
    - "/etc/localtime:/etc/localtime:ro"

  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}
    volumes:
      - /docker/immich/pgdata:/var/lib/postgresql/data
    restart: always

Your .env content

TZ=America/New_York
ETC....

Reproduction steps

1.
2.
3.
...

Additional information

Could this be an issue from an old import?

alextran1502 commented 8 months ago

Try adding these lines to your services and restart the stack image

Milkysunshine commented 8 months ago

I will do, but going into console of each container in the stack and sending the 'date' command shows the correct time

Milkysunshine commented 8 months ago

Added, and rebuilt the stack. No change in memories. If I go back to this day 4 years ago yesterday, many of those pictures show in today's memories.

Screenshot_20231219_182701 Screenshot_20231219_182750

Milkysunshine commented 8 months ago

Exif data is correct: Screenshot_20231219_183750

GitPuffy commented 8 months ago

Similar scenario with me but I'd like to add that the UTC/GMT date is used in the Immich app on my iPhone. It seems the app is not looking at the device's timezone to calculate against. If I look at a memory through the web browser on my computer the data is properly calculated against my computer's timezone.

jrasm91 commented 1 week ago

This has been fixed. Memories are queried based off of the local time of the picture, instead of the day of the server.