Pod expiry datetime drifting until next refresh or connection (issue#92)

This commit is contained in:
Theo van Elsberg 2021-09-04 00:17:41 +02:00
parent 51709c2af8
commit 9e4c1abd12

View file

@ -240,7 +240,7 @@ class OmnipodDashPodStateManagerImpl @Inject constructor(
return ZonedDateTime.now()
.plusHours(podLifeInHours.toLong())
.minusMinutes(minutesSinceActivation.toLong())
.plus(Duration.ofMillis(System.currentTimeMillis() - lastUpdatedSystem))
.minus(Duration.ofMillis(System.currentTimeMillis() - lastUpdatedSystem))
}
return null
}