changeset 9410:52314c4ab3be

Fixed: computing of min and max date
author mschaefer
date Thu, 16 Aug 2018 09:43:55 +0200
parents 38201f5b0dd9
children fe7edef5af47
files artifacts/src/main/java/org/dive4elements/river/artifacts/services/DynamicMainValuesTimeRangeDeterminationService.java
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DynamicMainValuesTimeRangeDeterminationService.java	Thu Aug 16 08:47:41 2018 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/services/DynamicMainValuesTimeRangeDeterminationService.java	Thu Aug 16 09:43:55 2018 +0200
@@ -99,17 +99,17 @@
                 continue;
             }
 
-            if (gaugeDates[0].getTime() > startTime.getTime())
+            if (gaugeDates[0].getTime() > min.getTime())
                 min = gaugeDates[0];
 
-            if (gaugeDates[1].getTime() < endTime.getTime())
+            if (gaugeDates[1].getTime() < max.getTime())
                 max = gaugeDates[1];
 
             String errormsg = null;
             if ((gaugeDates[1].getTime() < endTime.getTime()) || (gaugeDates[0].getTime() > startTime.getTime()))
                 errormsg = makeDoesNotCoverErrorMsg(gaugeDates[0], gaugeDates[1], meta);
 
-            gaugeResults.add(new GaugeInfoResult.GaugeInfo(errormsg, gauge, min, max));
+            gaugeResults.add(new GaugeInfoResult.GaugeInfo(errormsg, gauge, gaugeDates[0], gaugeDates[1]));
         }
 
         // common Range and correct errorMsg

http://dive4elements.wald.intevation.org