immich-app / immich

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

[BUG] Mobile app shows wrong dates on my photos #4301

Open Absent1337 opened 1 year ago

Absent1337 commented 1 year ago

The bug

Date is completely wrong , on photos that I received from someone else. My phone's gallery shows correct date

Screenshot_20231002_102959_Gallery

But date of the same photo in immich is wrong

Screenshot_20231002_102937

The OS that Immich Server is running on

Ubuntu 22, docker

Version of Immich Server

1.79.1

Version of Immich Mobile App

1.79

Platform with the issue

Your docker-compose.yml content

networks:
  proxy-net:
    external: true
  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
    env_file:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always
    networks:
      - immich

  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:
      - .env
    depends_on:
      - redis
      - database
      - typesense
    restart: always
    networks:
      - immich

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - /home/milosz/Immich/model-cache:/cache
    env_file:
      - .env
    restart: always
    networks:
      - immich

  immich-web:
    container_name: immich_web
    image: ghcr.io/immich-app/immich-web:${IMMICH_VERSION:-release}
    env_file:
      - .env
    restart: always
    networks:
      - immich

  typesense:
    container_name: immich_typesense
    image: typesense/typesense:0.24.1@sha256:9bcff2b829f12074426ca044b56160ca9d777a0c488303469143dd9f8259d4dd
    environment:
      - TYPESENSE_API_KEY=${TYPESENSE_API_KEY}
      - TYPESENSE_DATA_DIR=/data
      # remove this to get debug messages
      - GLOG_minloglevel=1
    volumes:
      - /home/milosz/Immich/tsdata:/data
    restart: always
    networks:
      - immich

  redis:
    container_name: immich_redis
    image: redis:6.2-alpine@sha256:70a7a5b641117670beae0d80658430853896b5ef269ccf00d1827427e3263fa3
    restart: always
    networks:
      - immich

  database:
    container_name: immich_postgres
    image: postgres:14-alpine@sha256:28407a9961e76f2d285dc6991e8e48893503cc3836a4755bbc2d40bcc272a441
    env_file:
      - .env
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
    volumes:
      - /home/milosz/Immich/pgdata:/var/lib/postgresql/data
    restart: always
    networks:
      - immich

  immich-proxy:
    container_name: immich_proxy
    image: ghcr.io/immich-app/immich-proxy:${IMMICH_VERSION:-release}
    environment:
      # Make sure these values get passed through from the env file
      - IMMICH_SERVER_URL
      - IMMICH_WEB_URL
    ports:
      - 2283:8080
    depends_on:
      - immich-server
      - immich-web
    restart: always
    networks:
      proxy-net:
        ipv4_address: 172.19.1.15
      immich:

Your .env content

# ou 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=/p1/media-storage/Immich-storage

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

# Connection secrets for postgres and typesense. You should change these to random passwords
TYPESENSE_API_KEY=(secret)
DB_PASSWORD=(secret)

# 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

# IMMICH_SERVER_URL=https://test.xyz
# IMMICH_WEB_URL=https://test.xyz

Reproduction steps

View photo in mobile app or web server

Additional information

No response

wittymap commented 1 year ago

I am also seeing this issue on photos that I took on the phone (not received from someone else). I've attached a photo with the issue. iOS photos app shows the date as Oct 29 2023 at 20:12 (correct). Immich shows the date as Oct 27 2023 at 15:08 (both on mobile & web).

Several other similar photos taken at about the same time on the same phone with the same file format are showing up correctly in Immich.

I have foreground upload turned on, and background upload turned off. When I opened Immich for the first time after taking the photos, they showed up in the correct order in the Immich timeline. After a few seconds, the problem photos jumped to their incorrect date in the Immich timeline and have stayed there since. They remain in the correct order in the iOS photos app timeline.

iOS App version 1.83.0 build.123 Server Version 1.83.0

One problem photo (not the only one): IMG_0281

wittymap commented 1 year ago

@alextran1502 did this issue fall through the cracks? I didn't see any action after the original report. Thanks!

Also, I'd suggest maybe renaming the issue as it isn't just the mobile app. The wrong dates are showing on the web app as well on problem photos.

alextran1502 commented 1 year ago

@wittymap Ah we have other 200 other issues to get to as well. We will get to this eventually 😛 Thank you for bringing this to our attention again.

alextran1502 commented 1 year ago

I've just tried update your attached photo and this is what I see

image

Is this the expected date?

wittymap commented 1 year ago

@wittymap Ah we have other 200 other issues to get to as well. We will get to this eventually 😛 Thank you for bringing this to our attention again.

Understood, thanks for all you do here. Just wanted to make sure it didn't fall through the cracks :)

Is this the expected date?

Yep, you got the correct date. I just tried again with the file (deleted it from the library and from trash and uploaded the version downloaded it from Github and everything) and it is still showing up in the wrong spot. So something seems to be going wrong on my server.

I'm on server Version 1.83.0

alextran1502 commented 1 year ago

Can you help me zip up the original file and send it here?

Does your server/container have any special timezone settings?

Can you try uploading to https://demo.immich.app?

wittymap commented 1 year ago

No special timezone settings, it's running in Docker on a fresh install of Mac OS 12. Zip'd file attached. Could you reset the password on the demo server? I can't log in with the demo credentials.

IMG_0281.zip

alextran1502 commented 1 year ago

Can you try this? https://main.preview.immich.app/

wittymap commented 1 year ago
wittymap commented 1 year ago

Here's another photo with the same symptoms. Re-saving the HEIC photo as JPG has no effect, it gets placed on the wrong date regardless. This one was also taken on Oct 29 and is being placed in Oct 20 in the timeline. Note that this is only happening on my MacOS/Docker install of Immich - I have an install on Windows 10/Docker that is behaving correctly. IMG_0280.zip