Mercurial > lada > lada-server
changeset 1074:90bc64e74e4a
Adjust end to end of the day.
Before, no Probe could be generated at the day of the end.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Fri, 30 Sep 2016 17:38:04 +0200 (2016-09-30) |
parents | 43599f66ceaf |
children | b5314ea024c6 |
files | src/main/java/de/intevation/lada/factory/ProbeFactory.java |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/main/java/de/intevation/lada/factory/ProbeFactory.java Fri Sep 30 16:37:20 2016 +0200 +++ b/src/main/java/de/intevation/lada/factory/ProbeFactory.java Fri Sep 30 17:38:04 2016 +0200 @@ -201,8 +201,14 @@ public List<LProbe> create(Messprogramm messprogramm, Long from, Long to) { Calendar start = Calendar.getInstance(); start.setTimeInMillis(from); + Calendar end = Calendar.getInstance(); end.setTimeInMillis(to); + /* Adjust to end of the day as we want to generate Probe objects + * before or at this day. */ + end.set(Calendar.HOUR_OF_DAY, 23); + end.set(Calendar.MINUTE, 59); + end.set(Calendar.SECOND, 59); List<LProbe> proben = new ArrayList<LProbe>();