immich icon indicating copy to clipboard operation
immich copied to clipboard

[BUG] Changing timezone only stores offset rather than offset plus name

Open ITestInProd opened this issue 1 year ago • 4 comments
trafficstars

The bug

When changing the timezone of a file Immich appears to only store the offset rather than the offset plus display name. When next editing the date/time Immich will display a different display name than previously selected.

I believe the web UI is selecting the first display name match based on the value of the exifInfo->timeZone field.

{ "exifInfo": { "make": null, "model": null, "exifImageWidth": 1487, "exifImageHeight": 1733, "fileSizeInByte": 992041, "orientation": "1", "dateTimeOriginal": "2023-01-11T13:09:00.000Z", "modifyDate": "2007-08-19T22:25:51.328Z", "timeZone": "UTC+2", "lensModel": null, "fNumber": null, "focalLength": null, "iso": null, "exposureTime": null, "latitude": 53.49256, "longitude": 17.601866, "city": "Sępólno Krajeńskie", "state": "Powiat sępoleński, Kujawsko-Pomorskie", "country": "Poland", "description": "", "projectionType": null } }

https://github.com/immich-app/immich/assets/5438593/c0d843c4-ee4f-4b69-b892-4df204d7ca29

The OS that Immich Server is running on

N/A

Version of Immich Server

1.91.4

Version of Immich Mobile App

N/A

Platform with the issue

  • [ ] Server
  • [X] Web
  • [x] Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

1.Log in to https://demo.immich.app/photos
2.Select a photo and open the info pane.
3.Select edit next to the date.
4.Click on the hidden timezone field. This is not the Search bar (ref bug https://github.com/immich-app/immich/issues/5844).
5.Scroll to a new timezone such as `Europe/Helsinki (UTC+02:00)`.
6.Click Confirm.
7.Observe the timezone changes in the info pane.
8.Select edit next to the date.
9.Observe the displayed timezone is now `Africa/Blantyre (UTC+02:00)`.

Additional information

No response

ITestInProd avatar Dec 20 '23 17:12 ITestInProd

Correct. The web UI ignores any time zone information and only deals with time zone offsets. With v1.114.0 (released today) the "home" zone (configured in the browser) is preferred, if the offset matches. However, if you manually edit the time zone or have a device (smartphone?) that provides the time zone in addition to the offset, this is currently ignored. I'm aware of this, and I'll look into this issue.

C-Otto avatar Sep 06 '24 14:09 C-Otto

I had a closer look. The time zone name that I assumed was provided by my smartphone is actually derived from the GPS coordinates (thanks to a library named exiftool-vendored). While it is rather easy to make use of this information (the next release will contain another tiny feature), we cannot write/update/fix the time zone information in any way. The EXIF file format (used by the XMP sidecar files) does not define a way to store time zone names and, because of that, the library we use to read and write these files also doesn't support it.

There are some ideas to invent a non-standard way to store this information, but I don't know if that's worth the trouble.

As a user I'd just make sure that the date + time + offset of my assets is correct. Time zones only provide an advantage over offsets when dealing with different points in time (especially moving time, things like "tomorrow"), while each asset only has a single and fixed point in time.

C-Otto avatar Sep 09 '24 21:09 C-Otto

I'd like to close this, due to limitations in XMP. Timezones in itself are tricky/unreliable anyway, and even if the users decides to fix things manually, we have no way of storing the information (using XMP). @jrasm91?

C-Otto avatar Oct 10 '24 13:10 C-Otto

I think we can take the stance, but the user experience is confusing. We could add a note on the screen and/or change the drop-down to be "offset first" instead of "name first". We prioritize and differentiate between names in the same zone, but then don't use it, which is confusing.

jrasm91 avatar Oct 10 '24 16:10 jrasm91

An option to display offsets instead of names would be great. Additionally, would it be possible to derive name from photo location, if there is one? Immich should be able to know whether GMT-5 is New York and not Atikokan.

JSaterdalen avatar Mar 21 '25 20:03 JSaterdalen