From dafd21b651514a2d5e87808ae022100a73d731df Mon Sep 17 00:00:00 2001 From: Evgeny Chukharev-Hudilainen Date: Tue, 2 Jun 2020 23:48:13 -0500 Subject: [PATCH 1/2] Fix for TZ in Western hemisphere When timezone is < UTC, then local year at UNIX epoch is 1969, not 1970. --- apps/boot/bootloader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/boot/bootloader.js b/apps/boot/bootloader.js index c16984f10..018b31011 100644 --- a/apps/boot/bootloader.js +++ b/apps/boot/bootloader.js @@ -16,13 +16,13 @@ setWatch(() => { `; delete settings; // check to see if our clock is wrong - if it is use GPS time -if ((new Date()).getFullYear()==1970) { +if ((new Date()).getFullYear()<2000) { E.showMessage("Searching for\nGPS time"); Bangle.on('GPS',function cb(g) { Bangle.setGPSPower(0); Bangle.removeListener("GPS",cb); if (!g.time || (g.time.getFullYear()<2000) || - (g.time.getFullYear()==2250)) { + (g.time.getFullYear()>2200)) { // GPS receiver's time not set - just boot clock anyway eval(clockApp);delete clockApp; return; From c71aedcef95b0e4d223813f807279d42b00c641a Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Wed, 3 Jun 2020 08:09:14 +0100 Subject: [PATCH 2/2] Fix 'GPS time' checks for western hemisphere --- apps.json | 2 +- apps/boot/ChangeLog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/apps.json b/apps.json index 94708df59..c4faac6f5 100644 --- a/apps.json +++ b/apps.json @@ -2,7 +2,7 @@ { "id": "boot", "name": "Bootloader", "icon": "bootloader.png", - "version":"0.17", + "version":"0.18", "description": "This is needed by Bangle.js to automatically load the clock, menu, widgets and settings", "tags": "tool,system", "type":"bootloader", diff --git a/apps/boot/ChangeLog b/apps/boot/ChangeLog index c157c6705..fc67fe6b7 100644 --- a/apps/boot/ChangeLog +++ b/apps/boot/ChangeLog @@ -16,3 +16,4 @@ 0.15: Added BLE HID option for Joystick and bare Keyboard 0.16: Detect out of memory errors and draw them onto the bottom of the screen in red 0.17: Don't modify beep/buzz behaviour if firmware does it automatically +0.18: Fix 'GPS time' checks for western hemisphere