Merge pull request #113 from vanelsberg/FixPodExpires

Pod expiry datetime drifting until next refresh or connection (issue#92)
This commit is contained in:
Andrei Vereha 2021-09-12 13:36:24 +02:00 committed by GitHub
commit 3432dcf85f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
}