-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
fix(server): prefer explicit timezone over GPS based guess #12707
Conversation
db62258
to
4334599
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM besides the linting issue ;)
4334599
to
09deeb7
Compare
I added |
Why not use a ternary? |
09deeb7
to
7abe36f
Compare
exiftool-vendored sadly treats the offset +00:00 (used in several countries) as unknown and may return a timezone which is based on GPS coordinates. Because of this, when one manually fixes the timezone offset to +00:00, this fix is overwritten. With this fix, we explicitly prefer +00:00 (if set).
Good question. I'm not used to it, but it doesn't look too bad. |
Why would the gps timezone ever be wrong? |
The GPS location (long/lat) is used to derive the timezone. Based on my experience, this can be wrong in at least two scenarios.
In both cases there's no way to override/correct this guess, which is rather annoying. One could tweak the location, but that's rather unintuitive. |
This PR doesn't address those situations at all. The change is a hard coded work around for the We seem to have two options:
|
The behavior you want is already what happens for offsets other than +00:00. |
So then this is more of an exiftool-vendored bug than anything. Let's just wait for it to be fixed upstream in that case. |
Yeah, we could do that. However, I haven't received any response in the past three weeks. |
exiftool-vendored sadly treats the offset +00:00 (used in several countries) as unknown and may return a timezone which is based on GPS coordinates. Because of this, when one manually fixes the timezone offset to +00:00, this fix is overwritten. With this fix, we explicitly prefer +00:00 (if set).
To test: Have an asset with GPS coordinates that exiftool-vendored maps to a timezone (you can check the
exif
database table, columntimeZone
). For this asset, manually change the date to use an offset of +00:00 (e.g.Atlantic/Reykjavik
). The XMP files correctly includes +00:00. Without this fix, the database still contains the old (wrong?) timezone. With this fix, the timezone isUTC+0
.