@DerGuteWolf wasn't aware of that. That last link looks pretty useful.
Since Bangle uses a browser, it already knows the timezone offset: just type new Date() in any browser console. It will have the tz offset of your computer. Change your system timezone to a different, and new Date() changes to a different tz as well. So in 99.99% I think there would be no need for GPS position. Pre-select the timezone based on browser's tz, but allow the user to change it. Maybe?
But the code would have to figure out the DST change date. Haven't looked in detail, don't know if it's always unambiguous based on the browser's time zone.
And to save flash, memory, and CPU cycles on the Bangle, I think actual calculation should be done in the browser, and only minimal data and logic should live on the Bangle.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@DerGuteWolf wasn't aware of that. That last link looks pretty useful.
Since Bangle uses a browser, it already knows the timezone offset: just type
new Date()
in any browser console. It will have the tz offset of your computer. Change your system timezone to a different, andnew Date()
changes to a different tz as well. So in 99.99% I think there would be no need for GPS position. Pre-select the timezone based on browser's tz, but allow the user to change it. Maybe?But the code would have to figure out the DST change date. Haven't looked in detail, don't know if it's always unambiguous based on the browser's time zone.
And to save flash, memory, and CPU cycles on the Bangle, I think actual calculation should be done in the browser, and only minimal data and logic should live on the Bangle.