You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.
Yes
The bug
When using the Upload endpoint of the Immich API described https://immich.app/docs/api/upload-asset, the "fileCreatedAt" attribute is overwritten when uploaded.
name: immichservices:
immich-server:
container_name: immich_serverimage: 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 transcodingvolumes:
# 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/storage/photography:/mnt/photography:roenv_file:
- .envports:
- '2283:2283'depends_on:
- redis
- databaserestart: alwayshealthcheck:
disable: falseimmich-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}-cudaimage: 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 applicablevolumes:
- model-cache:/cacheenv_file:
- .envrestart: alwayshealthcheck:
disable: falseredis:
container_name: immich_redisimage: docker.io/valkey/valkey:8-bookworm@sha256:ff21bc0f8194dc9c105b769aeabf9585fea6a8ed649c0781caeac5cb3c247884healthcheck:
test: redis-cli ping || exit 1restart: alwaysdatabase:
container_name: immich_postgresimage: ghcr.io/immich-app/postgres:14-vectorchord0.3.0-pgvectors0.2.0environment:
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/datarestart: alwaysvolumes:
model-cache:
Your .env content
# 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=Etc/UTC# 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=retracted
# The values below this line do not need to be changed###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
Reproduction steps
Upload a file with the upload_asset api
I used a Python script for that and simply modified this line: 'fileCreatedAt': datetime.fromtimestamp(stats.st_mtime) + relativedelta(years=-2),
which result in a datetime two years earlier
Post the request to the Immich API
Query the database with docker exec -it immich_postgres psql -U postgres immich -c "select \"fileCreatedAt\",\"fileModifiedAt\",\"localDateTime\", \"createdAt\",\"updatedAt\" from assets where assets.id = '<yourID>'"
The fileCreatedAt column shows the createDate from the Exif data instead.
Relevant log output
Additional information
Is this on purpose? If so, what does the field fileCreatedAt mean for upload_asset?
Addionally, should the fileCreatedAt datetime contain the timezone (offset)? Otherwise, I can't specify the timezone.
The text was updated successfully, but these errors were encountered:
ok, I just found out that the updateAssets endpoint can modify the fileCreatedAt field. Still confusing... also that updateAssets takes a string and uploadAssets takes datetime objects.
I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.
The bug
When using the Upload endpoint of the Immich API described https://immich.app/docs/api/upload-asset, the "fileCreatedAt" attribute is overwritten when uploaded.
Maybe related: #15640
The OS that Immich Server is running on
Ubuntu 24.04
Version of Immich Server
v1.133.1
Version of Immich Mobile App
N/A
Platform with the issue
Your docker-compose.yml content
Your .env content
Reproduction steps
I used a Python script for that and simply modified this line:
'fileCreatedAt': datetime.fromtimestamp(stats.st_mtime) + relativedelta(years=-2),
which result in a datetime two years earlier
docker exec -it immich_postgres psql -U postgres immich -c "select \"fileCreatedAt\",\"fileModifiedAt\",\"localDateTime\", \"createdAt\",\"updatedAt\" from assets where assets.id = '<yourID>'"
The fileCreatedAt column shows the createDate from the Exif data instead.
Relevant log output
Additional information
Is this on purpose? If so, what does the field fileCreatedAt mean for upload_asset?
Addionally, should the fileCreatedAt datetime contain the timezone (offset)? Otherwise, I can't specify the timezone.
The text was updated successfully, but these errors were encountered: