make now part of the past

This commit is contained in:
AdrianLxM 2018-04-25 12:15:29 +02:00 committed by GitHub
parent da96b2d87c
commit b5a6ef2ecc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -415,7 +415,7 @@ public class IobCobCalculatorPlugin extends PluginBase {
displayCob = autosensData.cob; displayCob = autosensData.cob;
for (Treatment treatment : treatments) { for (Treatment treatment : treatments) {
if (IobCobCalculatorPlugin.roundUpTime(treatment.date) > IobCobCalculatorPlugin.roundUpTime(autosensData.time) if (IobCobCalculatorPlugin.roundUpTime(treatment.date) > IobCobCalculatorPlugin.roundUpTime(autosensData.time)
&& treatment.date < now && treatment.carbs > 0) { && treatment.date <= now && treatment.carbs > 0) {
displayCob += treatment.carbs; displayCob += treatment.carbs;
} }
} }