forked from espruino/BangleApps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
widdst 0.05: Tweaks to ensure Gadgetbridge can't overwrite timezone o…
…n 2v19.106 and later
- Loading branch information
1 parent
e8928e0
commit ba082f6
Showing
3 changed files
with
16 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
0.01: Initial version | ||
0.02: Checks for correct firmware; E.setDST(...) moved to boot.js | ||
0.03: Convert Yes/No On/Off in settings to checkboxes | ||
0.04: Give the boot file the highest priority to ensure it runs before sched (fix #2663) | ||
0.04: Give the boot file the highest priority to ensure it runs before sched (fix #2663) | ||
0.05: Tweaks to ensure Gadgetbridge can't overwrite timezone on 2v19.106 and later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
(() => { | ||
|
||
if (E.setDST) { | ||
var dstSettings = require('Storage').readJSON('widdst.json',1)||{}; | ||
if (dstSettings.has_dst) { | ||
E.setDST(60*dstSettings.dst_size, 60*dstSettings.tz, dstSettings.dst_start.dow_number, dstSettings.dst_start.dow, | ||
dstSettings.dst_start.month, dstSettings.dst_start.day_offset, 60*dstSettings.dst_start.at, | ||
dstSettings.dst_end.dow_number, dstSettings.dst_end.dow, dstSettings.dst_end.month, dstSettings.dst_end.day_offset, | ||
60*dstSettings.dst_end.at); | ||
} else { | ||
E.setDST(0,0,0,0,0,0,0,0,0,0,0,0); | ||
} | ||
if (E.setDST) { | ||
let dstSettings = require('Storage').readJSON('widdst.json',1)||{}; | ||
if (dstSettings.has_dst) { | ||
E.setDST(60*dstSettings.dst_size, 60*dstSettings.tz, dstSettings.dst_start.dow_number, dstSettings.dst_start.dow, | ||
dstSettings.dst_start.month, dstSettings.dst_start.day_offset, 60*dstSettings.dst_start.at, | ||
dstSettings.dst_end.dow_number, dstSettings.dst_end.dow, dstSettings.dst_end.month, dstSettings.dst_end.day_offset, | ||
60*dstSettings.dst_end.at); | ||
/* on 2v19.106 and later, E.setTimeZone overwrites E.setDST so we | ||
manually disable E.setTimeZone here to stop Gadgetbridge resetting the timezone */ | ||
E.setTimeZone = function(){}; | ||
} else { | ||
E.setDST(0,0,0,0,0,0,0,0,0,0,0,0); | ||
} | ||
} | ||
|
||
})() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters