From d8798e0bcf26c711b9e6a747203c9d3c61d7ba54 Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Mon, 20 Nov 2017 13:23:25 +0100 Subject: [PATCH] use mills from status if available --- .../plugins/NSClientInternal/data/NSDeviceStatus.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSDeviceStatus.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSDeviceStatus.java index 2df50b2bd1..2bd61aa4a9 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSDeviceStatus.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSClientInternal/data/NSDeviceStatus.java @@ -336,7 +336,9 @@ public class NSDeviceStatus { try { long clock = 0L; - if (object.has("created_at")) + if (object.has("mills")) + clock = object.getLong("mills"); + else if (object.has("created_at")) clock = DateUtil.fromISODateString(object.getString("created_at")).getTime(); String device = getDevice(); Integer battery = null;