cgeo / cgeo

c:geo - The powerful Android geocaching app.
www.cgeo.org
Apache License 2.0
1.41k stars 569 forks source link

Timezone handling #16370

Open eddiemuc opened 1 week ago

eddiemuc commented 1 week ago

c:geo deals a lot with both time data and location data. When the users currentl location is in another timezone than a located item (eg a Geocache) then handling and displaying times and dates becomes tricky. And let's not forget about summer/wintertime either :-) Examples: events /event time in another timezone.

A proposed solution could be:

To do this I guess we would need a lib to get us the timezone for a given location. A quick search revealed two candidates:

Opinions?

eddiemuc commented 1 week ago

An imaginary example (such examples help me think :-)): Assume you are in portuguese (GMT-1), your phone is set to german timezone (GMT+1) and you look at an event in New York (GMT-5), taking place at new york local time 4pm-5pm

--> we would have four different times we could display

--> which of those times should be displayed?

ztNFny commented 1 week ago

Timezone of a event is available in API - but not in web.

See https://github.com/cgeo/cgeo/issues/13515#issuecomment-1280001202

Lineflyer commented 1 week ago

--> which of those times should be displayed?

I hate timezone issue.

But in your example it would be: The GUI should show the time of the event using the timezone the device is currently using. In your example its in the responsibility of the user to set his device to the timezone he is currently in.

Alternatively we could skip time zoning in general, take the event time as it is and add something like "(local time at event location)". If there is no time zone info on the web page, this seems to be the only option without guessing or applying complex procedures (like getting the timezone from the coordinates).

ztNFny commented 1 week ago

IF timezone becomes available then imho we should display: