Changing date on pictures does not work #7875

Closed
opened 2026-02-05 13:22:50 +03:00 by OVERLORD · 5 comments
Owner

Originally created by @ouafnico on GitHub (Nov 20, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

Hi all

Got a lot of pictures created the same day with an error in the date (my camera was wrong date).
I've selected the pictures on immich, check "change date", and ask to add 12hours to all pictures.

I got this error on web app : Failed to update assets (Immich Server Error)
And on the logs I got this :

Query failed : {
  durationMs: 3.5422980000148527,
  error: PostgresError: syntax error at or near ")"
      at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
      at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
      at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
      at Socket.emit (node:events:518:28)
      at addChunk (node:internal/streams/readable:561:12)
      at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
      at Readable.push (node:internal/streams/readable:392:5)
      at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
      at TCP.callbackTrampoline (node:internal/async_hooks:130:17) {
    severity_local: 'ERROR',
    severity: 'ERROR',
    code: '42601',
    position: '117',
    file: 'scan.l',
    line: '1176',
    routine: 'scanner_yyerror'
  },
  sql: 'update "asset_exif" set "dateTimeOriginal" = "dateTimeOriginal" + $1::interval, "timeZone" = $2 where "assetId" in () returning "assetId", "dateTimeOriginal", "timeZone"',
  params: [ '720 minute', 'Europe/Paris' ]
}
[Nest] 23  - 11/20/2025, 11:50:52 AM   ERROR [Api:ErrorInterceptor~wxttledu] Unknown error: PostgresError: syntax error at or near ")"
PostgresError: syntax error at or near ")"
    at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26)
    at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6)
    at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9)
    at Socket.emit (node:events:518:28)
    at addChunk (node:internal/streams/readable:561:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
    at Readable.push (node:internal/streams/readable:392:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:189:23)
    at TCP.callbackTrampoline (node:internal/async_hooks:130:17)

I'm using v2.3.1.

The OS that Immich Server is running on

Debian 13

Version of Immich Server

v2.3.1

Version of Immich Mobile App

v2.2.3

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

Default one

Your .env content

# You can find documentation for all the supported env variables at https://docs.immich.app/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=/opt/immich-data

# The location where your database files are stored. Network shares are not supported for the database
DB_DATA_LOCATION=/opt/immich-db

# 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=Europe/Paris

# 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=hidden

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=hidden
DB_DATABASE_NAME=immich
TYPESENSE_API_KEY=hidden
PUBLIC_LOGIN_PAGE_MESSAGE=Home Photos

Reproduction steps

  1. On web
  2. Select multiple pictures
  3. In the dots, choose change date
  4. Ask to add 12hours
  5. Get the error

Relevant log output


Additional information

No response

Originally created by @ouafnico on GitHub (Nov 20, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug Hi all Got a lot of pictures created the same day with an error in the date (my camera was wrong date). I've selected the pictures on immich, check "change date", and ask to add 12hours to all pictures. I got this error on web app : Failed to update assets (Immich Server Error) And on the logs I got this : ``` Query failed : { durationMs: 3.5422980000148527, error: PostgresError: syntax error at or near ")" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) { severity_local: 'ERROR', severity: 'ERROR', code: '42601', position: '117', file: 'scan.l', line: '1176', routine: 'scanner_yyerror' }, sql: 'update "asset_exif" set "dateTimeOriginal" = "dateTimeOriginal" + $1::interval, "timeZone" = $2 where "assetId" in () returning "assetId", "dateTimeOriginal", "timeZone"', params: [ '720 minute', 'Europe/Paris' ] } ``` ``` [Nest] 23 - 11/20/2025, 11:50:52 AM ERROR [Api:ErrorInterceptor~wxttledu] Unknown error: PostgresError: syntax error at or near ")" PostgresError: syntax error at or near ")" at ErrorResponse (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:794:26) at handle (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:480:6) at Socket.data (/usr/src/app/server/node_modules/.pnpm/postgres@3.4.7/node_modules/postgres/cjs/src/connection.js:315:9) at Socket.emit (node:events:518:28) at addChunk (node:internal/streams/readable:561:12) at readableAddChunkPushByteMode (node:internal/streams/readable:512:3) at Readable.push (node:internal/streams/readable:392:5) at TCP.onStreamRead (node:internal/stream_base_commons:189:23) at TCP.callbackTrampoline (node:internal/async_hooks:130:17) ``` I'm using v2.3.1. ### The OS that Immich Server is running on Debian 13 ### Version of Immich Server v2.3.1 ### Version of Immich Mobile App v2.2.3 ### Platform with the issue - [ ] Server - [x] Web - [x] Mobile ### Device make and model _No response_ ### Your docker-compose.yml content ```YAML Default one ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://docs.immich.app/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=/opt/immich-data # The location where your database files are stored. Network shares are not supported for the database DB_DATA_LOCATION=/opt/immich-db # 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=Europe/Paris # 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=hidden # The values below this line do not need to be changed ################################################################################### DB_USERNAME=hidden DB_DATABASE_NAME=immich TYPESENSE_API_KEY=hidden PUBLIC_LOGIN_PAGE_MESSAGE=Home Photos ``` ### Reproduction steps 1. On web 2. Select multiple pictures 3. In the dots, choose change date 4. Ask to add 12hours 5. Get the error ### Relevant log output ```shell ``` ### Additional information _No response_
Author
Owner

@danieldietzler commented on GitHub (Nov 20, 2025):

Hey, I am unable to reproduce that on the demo instance (https://demo.immich.app). Could you get a screen recording from there that reproduces the bug?

@danieldietzler commented on GitHub (Nov 20, 2025): Hey, I am unable to reproduce that on the demo instance (https://demo.immich.app). Could you get a screen recording from there that reproduces the bug?
Author
Owner

@ouafnico commented on GitHub (Nov 20, 2025):

Sure.

https://github.com/user-attachments/assets/b6d63059-a4e5-4705-8008-d3ca001880a6

@ouafnico commented on GitHub (Nov 20, 2025): Sure. https://github.com/user-attachments/assets/b6d63059-a4e5-4705-8008-d3ca001880a6
Author
Owner

@bo0tzz commented on GitHub (Nov 20, 2025):

Can you reproduce this specifically on https://demo.immich.app/ as well?

@bo0tzz commented on GitHub (Nov 20, 2025): Can you reproduce this specifically on https://demo.immich.app/ as well?
Author
Owner

@ouafnico commented on GitHub (Nov 20, 2025):

Hum I think I know the reason.
Can you tell me : does the change affect the picture's files, or, it change something in the database ?

Because theses pictures are external library, over a readonly NFS (to avoid some jokes I already have once)... so the change will fail if the files are touched

@ouafnico commented on GitHub (Nov 20, 2025): Hum I think I know the reason. Can you tell me : does the change affect the picture's files, or, it change something in the database ? Because theses pictures are external library, over a readonly NFS (to avoid some jokes I already have once)... so the change will fail if the files are touched
Author
Owner

@bo0tzz commented on GitHub (Nov 20, 2025):

Yeah, edits are written to an XMP sidecar and so don't work on readonly libraries.

@bo0tzz commented on GitHub (Nov 20, 2025): Yeah, edits are written to an XMP sidecar and so don't work on readonly libraries.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7875