Yepp, I increased the timezone by one (I'm at CET, that's +1 hour. Now it's set to +2 to show the current valid local time)
AFAIK GPS is UTC, so no DST change there.
DST is kind of crazy and weird, if you want to support all countries. So the best thing I think would be to expand the Locale loader and load your selected country's next couple DST change dates.
Well, those change dates can be formulated as rules like in the Olson tz database cf. eg. https://en.wikipedia.org/wiki/Tz_database#Daylight_saving_time_(DST)_rules, https://en.wikipedia.org/wiki/Tz_database#Example_zone_and_rule_lines
So it would be enough to include the current rule for a locale . Problem ist that a locale could contain lots of timezone (eg. the US is fragmented, going to conty level).
So maybe a better idea would be a special settings app, which would read the current GPS location, query the current time zone info for this location and use this in the future.
Google Maps has such a API cf https://developers.google.com/maps/documentation/timezone/intro .
Unfortunatly nominatim dismissed including timezone info cf. https://trac.openstreetmap.org/ticket/4200 .
Or instead of GPS simple let the user select a timezone.
The "next couple DST change dates" could be taken from https://raw.githubusercontent.com/moment/moment-timezone/develop/data/unpacked/latest.json
© Espruino, powered by microcosm.
Report a problem