Mercurial > dive4elements > river
changeset 5775:300c0270c576
Switch start- and stoptime if starttime is after stoptime in timeinterval
importer.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Fri, 19 Apr 2013 15:40:37 +0200 |
parents | 496c8c9d4913 |
children | e95427ed80e5 |
files | flys-backend/src/main/java/de/intevation/flys/importer/ImportTimeInterval.java |
diffstat | 1 files changed, 8 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/ImportTimeInterval.java Fri Apr 19 12:44:55 2013 +0200 +++ b/flys-backend/src/main/java/de/intevation/flys/importer/ImportTimeInterval.java Fri Apr 19 15:40:37 2013 +0200 @@ -27,8 +27,14 @@ } public ImportTimeInterval(Date startTime, Date stopTime) { - this.startTime = startTime; - this.stopTime = stopTime; + if (startTime.after(stopTime)) { + this.stopTime = startTime; + this.startTime = stopTime; + } + else { + this.startTime = startTime; + this.stopTime = stopTime; + } } public Date getStartTime() {