From 2a5cd559d5b4dfb496ca6021b5ae9f6c640f4ce4 Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Tue, 21 Mar 2023 15:08:59 +0000 Subject: [PATCH] Fix issue updating timezone in setting.json if the timezone is zero (https://github.com/espruino/BangleApps/issues/2575) --- .../service/devices/banglejs/BangleJSDeviceSupport.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java index fc6f43067..482e03c69 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/banglejs/BangleJSDeviceSupport.java @@ -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"); }