[PR #24498] [CLOSED] fix(web): show inferred timezone in the date editor #17898

Closed
opened 2026-02-05 16:29:19 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/24498
Author: @skatsubo
Created: 12/10/2025
Status: Closed

Base: mainHead: fix/date-editor-timezone


📝 Commits (3)

  • 3659bee Extract date section into a separate file
  • 3ff1c8f Fix date editor: use initial timezone from asset when available
  • d940789 Test date editor for displaying inferred asset timezone

📊 Changes

3 files changed (+140 additions, -78 deletions)

View changed files

📝 e2e/src/web/specs/asset-viewer/detail-panel.e2e-spec.ts (+41 -1)
web/src/lib/components/asset-viewer/detail-panel-date.svelte (+96 -0)
📝 web/src/lib/components/asset-viewer/detail-panel.svelte (+3 -77)

📄 Description

UPD: the one line bugfix moved into a separate #24513.

Description

Issue:
Currently the date editor displays (selects) the first timezone from the sorted list of timezones having the same offset. Even if the asset already has an inferred timezone (America/New_York -05:00), the selector still falls back to the first timezone having same offset (America/Atikokan -05:00). See the screenshots below.
Previously, initialTimezone was passed to the modal, but it was dropped (mistakenly?) in one of the recent PRs that touched it.

PR:
Basically a one line fix 3ff1c8f8ef - pass initialTimezone as needed.
The rest:

  • refactoring: extracted DatePanelDate
  • e2e: a small test that uploads a test asset, then invokes the date editor and validates date and timezone.

Depends on this PR to be merged: https://github.com/immich-app/test-assets/pull/24. Or should I change the submodule URL to point to my fork until it's merged?

How Has This Been Tested?

Added e2e test.

Considered adding unit tests, but they seem too implementation-specific (which is reasonable): expect timezone to be consumed from exifInfo and passed from the date panel to AssetChangeDateModal, expect timezone to be consumed and displayed in AssetChangeDateModal. Let me know if it makes sense to add. For now I skipped unit tests.

Screenshots

Before (bug): image

After (fix):
image

Checklist:

  • I have performed a self-review of my own code
  • I have no unrelated changes in the PR.
  • I have written tests for new code (if applicable)

Please describe to which degree, if any, an LLM was used in creating this pull request.

Assisted with tests.


🔄 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/24498 **Author:** [@skatsubo](https://github.com/skatsubo) **Created:** 12/10/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/date-editor-timezone` --- ### 📝 Commits (3) - [`3659bee`](https://github.com/immich-app/immich/commit/3659bee48f1fff32d33bf6eb2ea07633b4f84439) Extract date section into a separate file - [`3ff1c8f`](https://github.com/immich-app/immich/commit/3ff1c8f8ef848af9d1eba9001954bbfb6bab10b5) Fix date editor: use initial timezone from asset when available - [`d940789`](https://github.com/immich-app/immich/commit/d9407898226b6ea98ccbe955869d7fc5950f8482) Test date editor for displaying inferred asset timezone ### 📊 Changes **3 files changed** (+140 additions, -78 deletions) <details> <summary>View changed files</summary> 📝 `e2e/src/web/specs/asset-viewer/detail-panel.e2e-spec.ts` (+41 -1) ➕ `web/src/lib/components/asset-viewer/detail-panel-date.svelte` (+96 -0) 📝 `web/src/lib/components/asset-viewer/detail-panel.svelte` (+3 -77) </details> ### 📄 Description UPD: the one line bugfix moved into a separate #24513. ## Description Issue: Currently the date editor displays (selects) the _first_ timezone from the sorted list of timezones having the same offset. Even if the asset already has an inferred timezone (America/New_York -05:00), the selector still falls back to the _first_ timezone having same offset (America/Atikokan -05:00). See the screenshots below. Previously, `initialTimezone` was passed to the modal, but it was dropped (mistakenly?) in one of the recent PRs that touched it. PR: Basically a one line fix https://github.com/immich-app/immich/commit/3ff1c8f8ef848af9d1eba9001954bbfb6bab10b5 - pass `initialTimezone` as needed. The rest: - refactoring: extracted DatePanelDate - e2e: a small test that uploads a test asset, then invokes the date editor and validates date and timezone. **Depends** on this PR to be merged: https://github.com/immich-app/test-assets/pull/24. Or should I change the submodule URL to point to my fork until it's merged? ## How Has This Been Tested? Added e2e test. Considered adding unit tests, but they seem too implementation-specific (which is reasonable): expect timezone to be consumed from exifInfo and passed from the date panel to AssetChangeDateModal, expect timezone to be consumed and displayed in AssetChangeDateModal. Let me know if it makes sense to add. For now I skipped unit tests. <details><summary><h2>Screenshots</h2></summary> Before (bug): <img width="2558" height="1478" alt="image" src="https://github.com/user-attachments/assets/f633c250-f311-4f53-9a64-d7cfee9d2666" /> After (fix): <img width="2562" height="1470" alt="image" src="https://github.com/user-attachments/assets/4b5a5672-a3ea-462d-9a74-de8f087ed578" /> </details> ## Checklist: - [x] I have performed a self-review of my own code - [x] I have no unrelated changes in the PR. - [x] I have written tests for new code (if applicable) ## Please describe to which degree, if any, an LLM was used in creating this pull request. Assisted with tests. --- <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 16:29:19 +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#17898