use mills from status if available

This commit is contained in:
Milos Kozak 2017-11-20 13:23:25 +01:00
parent c5cd0e38ab
commit d8798e0bcf

View file

@ -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;