[PR #4354] [MERGED] fix(server): use fileCreatedAt in bucket calculation #10334

Closed
opened 2026-02-05 14:20:02 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/4354
Author: @etnoy
Created: 10/5/2023
Status: Merged
Merged: 10/5/2023
Merged by: @alextran1502

Base: mainHead: fix/correct-field-in-buckets


📝 Commits (1)

  • a0eafb5 fix: use fileCreatedAt in buckets

📊 Changes

2 files changed (+2 additions, -1 deletions)

View changed files

📝 server/src/infra/repositories/asset.repository.ts (+1 -1)
server/test/assets (+1 -0)

📄 Description

This is a minor fix that uses fileCreatedAt when computing time buckets. This fixes a bug we found for some users that don't use docker but instead run postgres locally. In that case, the db timezone will not be UTC and this means the time bucket call returns nothing, causing an empty timeline.

The root cause is likely a timezone translation between server and db.

How this has been tested: The bug is solved for the user. Also, I've tested on my docker setup and it works fine to browse and upload images. Should be trivial to merge.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/immich-app/immich/pull/4354 **Author:** [@etnoy](https://github.com/etnoy) **Created:** 10/5/2023 **Status:** ✅ Merged **Merged:** 10/5/2023 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `fix/correct-field-in-buckets` --- ### 📝 Commits (1) - [`a0eafb5`](https://github.com/immich-app/immich/commit/a0eafb5d260cc598bcd889b32d0eea67c3f64efa) fix: use fileCreatedAt in buckets ### 📊 Changes **2 files changed** (+2 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `server/src/infra/repositories/asset.repository.ts` (+1 -1) ➕ `server/test/assets` (+1 -0) </details> ### 📄 Description This is a minor fix that uses fileCreatedAt when computing time buckets. This fixes a bug we found for some users that don't use docker but instead run postgres locally. In that case, the db timezone will not be UTC and this means the time bucket call returns nothing, causing an empty timeline. The root cause is likely a timezone translation between server and db. How this has been tested: The bug is solved for the user. Also, I've tested on my docker setup and it works fine to browse and upload images. Should be trivial to merge. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 14:20:02 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#10334