1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-03 17:02:13 +01:00

Fix issue updating timezone in setting.json if the timezone is zero (https://github.com/espruino/BangleApps/issues/2575)

This commit is contained in:
Gordon Williams 2023-03-21 15:08:59 +00:00
parent aeb8607e78
commit 2a5cd559d5

View File

@ -905,7 +905,7 @@ public class BangleJSDeviceSupport extends AbstractBTLEDeviceSupport {
// set timezone
cmd += "E.setTimeZone("+tz+");";
// write timezone to settings
cmd += "(s=>{s&&(s.timezone="+tz+")&&require('Storage').write('setting.json',s);})(require('Storage').readJSON('setting.json',1))";
cmd += "(s=>s&&(s.timezone="+tz+",require('Storage').write('setting.json',s)))(require('Storage').readJSON('setting.json',1))";
uartTx(builder, cmd+"\n");
}