gpstime 0.04: Fix shown UTC time zone sign

pull/440/head
Tuukka Ikkala 2020-05-23 13:26:33 +03:00
parent 793b5d6361
commit 0bacb71bbd
3 changed files with 3 additions and 2 deletions

View File

@ -280,7 +280,7 @@
{ "id": "gpstime",
"name": "GPS Time",
"icon": "gpstime.png",
"version":"0.03",
"version":"0.04",
"description": "Update the Bangle.js's clock based on the time from the GPS receiver",
"tags": "tool,gps",
"storage": [

View File

@ -1 +1,2 @@
0.03: Fix time output on new firmwares when no GPS time set (fix #104)
0.04: Fix shown UTC time zone sign

View File

@ -47,7 +47,7 @@ Bangle.on('GPS',function(f) {
g.drawString(t[4],120,185); // time
if (fix.time) {
// timezone
var tz = (new Date()).getTimezoneOffset()/60;
var tz = (new Date()).getTimezoneOffset()/-60;
if (tz==0) tz="UTC";
else if (tz>0) tz="UTC+"+tz;
else tz="UTC"+tz;