[PR #706] [MERGED] fix(server): Incorrectly record timestamp and time zone of the asset #8730

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

📋 Pull Request Information

Original PR: https://github.com/immich-app/immich/pull/706
Author: @alextran1502
Created: 9/17/2022
Status: Merged
Merged: 9/22/2022
Merged by: @alextran1502

Base: mainHead: fix/web-incorrectly-display-time-in-detail-panel


📝 Commits (10+)

  • 8ee3ae7 fix(web): Incorrectly display time in detail panel when navigating in gallery view
  • 48ee67e Added TZ key to .env.example
  • 974bbfa Added TZ key to .env.example
  • 1b97fce Remove deadcode
  • 8d4026e Fixing incorrect UTC time
  • c474921 Added back the info button with restore functionality
  • 85b3dd0 Remove unused code
  • 5b12ca7 Store correct GMT time
  • fb16163 Added detail comment
  • bddba7a Show time correctly on mobile

📊 Changes

16 files changed (+392 additions, -63 deletions)

View changed files

📝 docker/.env.example (+0 -21)
📝 docker/docker-compose.yml (+0 -2)
📝 mobile/lib/modules/asset_viewer/ui/exif_bottom_sheet.dart (+1 -1)
📝 mobile/lib/modules/backup/views/backup_controller_page.dart (+1 -1)
📝 mobile/lib/modules/backup/views/failed_backup_status_page.dart (+1 -1)
📝 mobile/lib/modules/home/ui/daily_title_text.dart (+2 -2)
📝 mobile/lib/modules/home/ui/monthly_title_text.dart (+1 -1)
📝 mobile/lib/modules/search/providers/search_result_page.provider.dart (+2 -2)
📝 mobile/lib/shared/providers/asset.provider.dart (+4 -4)
📝 server/apps/immich/src/api-v1/user/user.controller.ts (+1 -4)
📝 server/apps/immich/src/app.module.ts (+1 -2)
📝 server/apps/microservices/src/processors/metadata-extraction.processor.ts (+52 -3)
📝 server/package-lock.json (+323 -11)
📝 server/package.json (+2 -0)
📝 web/src/lib/components/asset-viewer/detail-panel.svelte (+0 -8)
📝 web/src/routes/photos/+page.server.ts (+1 -0)

📄 Description

Fix #422

Context

The EXIF time that is extracted from the microservices container uses the local time zone where the images, photos were taken. The timestamp has the UTC annotation (i.e Z) at the end of the string. The result is the incorrect timestamp info of the asset

Solution

This PR includes the mechanism to extract the correct time zone from the GPS coordinate if presented in the file's EXIF, and to convert the timestamp to the correct UTC time so that the time will show correctly based on the mobile/web local time zone.

Notes

This changes will need to be propagated on the existing assets to register the correct timestamp. The admin function will handle this job in the subsequent PR.


🔄 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/706 **Author:** [@alextran1502](https://github.com/alextran1502) **Created:** 9/17/2022 **Status:** ✅ Merged **Merged:** 9/22/2022 **Merged by:** [@alextran1502](https://github.com/alextran1502) **Base:** `main` ← **Head:** `fix/web-incorrectly-display-time-in-detail-panel` --- ### 📝 Commits (10+) - [`8ee3ae7`](https://github.com/immich-app/immich/commit/8ee3ae7971c8cbb2eaa61c905b008b18997eb510) fix(web): Incorrectly display time in detail panel when navigating in gallery view - [`48ee67e`](https://github.com/immich-app/immich/commit/48ee67e18e172533860092655f327b048f698357) Added TZ key to .env.example - [`974bbfa`](https://github.com/immich-app/immich/commit/974bbfa547a1df2e6be6c41f60a63a74b401dd54) Added TZ key to .env.example - [`1b97fce`](https://github.com/immich-app/immich/commit/1b97fced8580742f3461e4b8beebb6d59653430c) Remove deadcode - [`8d4026e`](https://github.com/immich-app/immich/commit/8d4026ef2c872c866944b38de140391c65003e68) Fixing incorrect UTC time - [`c474921`](https://github.com/immich-app/immich/commit/c474921338a7d28f5df6c8e0a8b0bea9bbd34964) Added back the info button with restore functionality - [`85b3dd0`](https://github.com/immich-app/immich/commit/85b3dd0881ef169b06e863b6ca111348685d25fe) Remove unused code - [`5b12ca7`](https://github.com/immich-app/immich/commit/5b12ca7a30b0b0c7efe5ffe6d2225814655c517e) Store correct GMT time - [`fb16163`](https://github.com/immich-app/immich/commit/fb1616397f0e84982c7adc3aafb527f23266acbf) Added detail comment - [`bddba7a`](https://github.com/immich-app/immich/commit/bddba7a8ac01d7e04f8d92126420d042717a4b38) Show time correctly on mobile ### 📊 Changes **16 files changed** (+392 additions, -63 deletions) <details> <summary>View changed files</summary> 📝 `docker/.env.example` (+0 -21) 📝 `docker/docker-compose.yml` (+0 -2) 📝 `mobile/lib/modules/asset_viewer/ui/exif_bottom_sheet.dart` (+1 -1) 📝 `mobile/lib/modules/backup/views/backup_controller_page.dart` (+1 -1) 📝 `mobile/lib/modules/backup/views/failed_backup_status_page.dart` (+1 -1) 📝 `mobile/lib/modules/home/ui/daily_title_text.dart` (+2 -2) 📝 `mobile/lib/modules/home/ui/monthly_title_text.dart` (+1 -1) 📝 `mobile/lib/modules/search/providers/search_result_page.provider.dart` (+2 -2) 📝 `mobile/lib/shared/providers/asset.provider.dart` (+4 -4) 📝 `server/apps/immich/src/api-v1/user/user.controller.ts` (+1 -4) 📝 `server/apps/immich/src/app.module.ts` (+1 -2) 📝 `server/apps/microservices/src/processors/metadata-extraction.processor.ts` (+52 -3) 📝 `server/package-lock.json` (+323 -11) 📝 `server/package.json` (+2 -0) 📝 `web/src/lib/components/asset-viewer/detail-panel.svelte` (+0 -8) 📝 `web/src/routes/photos/+page.server.ts` (+1 -0) </details> ### 📄 Description Fix #422 ## Context The EXIF time that is extracted from the `microservices` container uses the local time zone where the images, photos were taken. The timestamp has the UTC annotation (i.e Z) at the end of the string. The result is the incorrect timestamp info of the asset ## Solution This PR includes the mechanism to extract the correct time zone from the GPS coordinate if presented in the file's EXIF, and to convert the timestamp to the correct UTC time so that the time will show correctly based on the mobile/web local time zone. ## Notes This changes will need to be propagated on the existing assets to register the correct timestamp. The admin function will handle this job in the subsequent PR. --- <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 13:52:16 +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#8730