-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image metadata has invalid time offset #4622
Comments
Thanks for your report! Unfortunately, no one tested and reported this when support for UTC offset "timezones" was added as an alternative to using the official timezone identifier. The reason fractions are not currently supported is that, based on what was requested at the time of implementation, there is only a fixed set of UTC offsets implemented in the frontend: photoprism/frontend/src/options/options.js Lines 7 to 33 in 42ce5ac
Of course, A possible workaround to avoid this error would be to round the time up or down - but then users will not notice that the chosen UTC offset is not exact. If you're asking for a "quick fix" that can be implemented within the scope of a bug report, that seems feasible. Note that we are currently refactoring the entire frontend codebase, so we cannot implement any changes there in the short term. |
I'd rather have the "real fix" that supports such timezones properly, I'm not in a hurry ! |
@Lectem I did a little more research on this and found that most timezone databases (lookup tables) don't seem to include an entry for I'm not an expert on all the timezone implementations out there, so it's unclear what to make of this, i.e. if setting/using/inventing a The only explicitly listed zone with a However, it also does not seem to be 100% correct to (forcefully) map Note that if you want us to proceed with this request, it would be very helpful if you could help with the research and test what happens with each of the proposed/possible solutions in combination with common tools and operating systems. Thank you very much! |
Just to make sure I'm understanding things correctly:
I think the best way is to not try to guess something impossible to guess. If we get a If the front-end needs to query photos in a specific timezone, let it do it. If for the world map (or any kind of request using timezone), then use a range instead of a hard value (that is, instead of querying This way it should also work for other timezones with partial hours (for example https://en.wikipedia.org/wiki/UTC%E2%88%9203:30 https://en.wikipedia.org/wiki/UTC%2B12:45 etc...)
I don't mind helping with this, however I do not have a go environment ready, would it require me building the project myself ? |
Note that the primary issue is NOT a "list we use", since we don't define what is on the list of common timezones - nor do we control how other apps and tools validate it and what they accept. For example, we also use a JavaScript library that converts timezones (which in turn might let the browser do it, which gets the list from the operating system,...). You could say that we could also customize the browser library to handle this, but what if later we want to write the timezone name back to the original file, or some client (mobile) app gets it from our API and can't handle it? Are you 100% sure that none of this will ever be a problem? |
1. What is not working as documented?
When analazing my latest photos from Nepal, I'm getting the following error:
The
exiftool -j
output of one of my photos:OffsetTime
is +5:45 which happens to be exactly Nepal's timezone. I don't understand why it's rejected except if the timezones code in Photoprism assumes timezone needs to be exactly 1hour. (yes, anything date/timezone related is complicated, that's why the IANA database exists https://www.iana.org/time-zones )2. How can we reproduce it?
Steps to reproduce the behavior:
3. What behavior do you expect?
+5:45 Timezone is accepted.
4. What could be the cause of your problem?
Code not allowing X:30 or X:45 timezones.
5. Can you provide us with example files for testing, error logs, or screenshots?
20241015_103317.zip
6. Which software versions do you use?
(a) PhotoPrism Architecture & Build Number: ARM64, Build [240420-ef5f14bc4]
(b) Database Type & Version: MariaDB
(c) Operating System Types & Versions: Linux
(d) Browser Types & Versions: Firefox
(e) Ad Blockers, Browser Plugins, and/or Firewall Software?
You can find the version/build number of the app in Settings by scrolling to the bottom. Note that MySQL 8 support has been discontinued, see system requirements at https://docs.photoprism.app/getting-started/#system-requirements.
7. On what kind of device is PhotoPrism installed?
(a) Device / Processor Type: NAS, ARM Cortex-A53
(b) Physical Memory & Swap Space in GB: 1GB
(c) Storage Type: HDD
(d) Anything else that might be helpful to know? Nope
The text was updated successfully, but these errors were encountered: