-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.
- Yes
The bug
What's happening?
The Immich webview and sometimes IOS app fail to apply the correct local time to assets lacking EXIF metadata (such as a photo downloaded from Instagram)
Web view
The web view consistently shows the timestamp without any UTC offset, being 4 hours ahead of the local time America/New_York in my case.
Immich IOS App
Shows the correct local time if the original photo is still present on the device.
If the original photo is delete from the device, eventually the app will show the incorrect timestamp with no UTC offset. It's a bit inconsistent because I think it only happens after a cache of the original is cleared.
Information
I've set the 'TZ' environmental variable to America/New_York
I checked the asset database for my photo and the fileCreatedAt value reads 2025-10-27 20:45:56+00 so it is stripped of the time zone, which should probably be expected since I'd assume the frontend ends should apply the localizations, but they're not.
I noticed that the API for the asset/get (getAssetInfo) endpoint has this to say about fileCreatedAt
"The actual UTC timestamp when the file was created/captured, preserving time zone information... Combined with time zone data, this can be used to determine the exact moment the photo was taken."
But when I requested the asset info myself using http://localhost:2283/api/assets/8c224d1d-913f-41fc-9619-3b6627074629?apiKey=<key> the fileCreatedAt field read this 2025-10-27T20:45:56.000Z which does not preserve the time zone despite what the API docs say, and since this asset doesn't have EXIF metadata, there's no way to figure out which time locale it was taken at. This wouldn't necessarily be an issue assuming the web view formats it according to the browsers locale as stated in the settings
"Format dates and numbers based on your browser locale"
But that does not appear to be happening for these assets that lack EXIF metadata
I believe this is the same issue that's mentioned in this discussion: discussioncomment-14722077 and discussioncomment-14722387 But I couldn't find any open or closed issues on it, just a bunch of old debates about which time value should be used.
The OS that Immich Server is running on
Debian GNU/Linux 12 (bookworm)
Version of Immich Server
v2.2.0 build.18950480972
Version of Immich Mobile App
2.1.0 build.231
Platform with the issue
- Server
- Web
- Mobile
Device make and model
iPhone 11, Chromium Browsers (Brave, Google Chrome, Edge)
Your docker-compose.yml content
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
- /etc/localtime:/etc/localtime:ro
- /mnt/d/Immich_test:/mnt/photos_test:ro
env_file:
- .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, 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:
- .env
restart: always
healthcheck:
disable: false
redis:
container_name: immich_redis
image: docker.io/valkey/valkey:8-bookworm@sha256:fec42f399876eb6faf9e008570597741c87ff7662a54185593e74b09ce83d177
healthcheck:
test: redis-cli ping || exit 1
restart: always
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
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
volumes:
model-cache:Your .env content
# You 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=./library
# The location where your database files are stored. Network shares are not supported for the database
DB_DATA_LOCATION=./postgres
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
TZ=America/New_York
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release
# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
DB_PASSWORD=postgres
# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immichReproduction steps
- Obtain a photo lacking EXIF metadata on your mobile device (like an Image from Instagram or Discord)
- Back it up to your Immich server using the IOS app
- Use the web view to check the timestamp it was taken at.
For me it's always four hours in the future since no UTC time zone offset is being applied.
Despite the correct TZ environmental variable and browser time locale settings as mentioned in the bug explanation above.
Relevant log output
Additional information
The details I mentioned in the bug explanation above could also indicate issues with the documentation of fileCreatedAt for the API (getAssetInfo) endpoint. But perhaps I'm misunderstanding the wording.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status