InternetTimeApplet@stefan: Fix timezone for accurate Beat Time calculation #5004
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change the hour/minute/second variable assignments to explicitly be in UTC format. Also, add one hour to the "getUTCHours()" call, as "Biel Mean Time" (BMT), which Beat Time is based upon, is defined by Swatch as UTC+1.
Previously this was calling Date's getHours/getMinutes/getSeconds function family, which returns LOCAL time. This had the effect of the Beat time returned by this desklet always being incorrect unless your computer's time is set to the UTC+1 timezone.
This commit fixes that and ensures that the correct universal Beat Time will be displayed regardless of the user's timezone. It also incorporates the calculation changes from @nstoeckigt via his previously-merged PR here.
Original author of this applet is @stefan12O, and I'm submitting this PR per his request here.