diff --git a/ees/src/main/java/io/github/agentsoz/ees/DisruptionModel.java b/ees/src/main/java/io/github/agentsoz/ees/DisruptionModel.java index 899b5fe5..23043a73 100644 --- a/ees/src/main/java/io/github/agentsoz/ees/DisruptionModel.java +++ b/ees/src/main/java/io/github/agentsoz/ees/DisruptionModel.java @@ -105,7 +105,7 @@ void loadJson(String file) throws IOException, ParseException, java.text.ParseEx Date date = format.parse(disruption.getStartHHMM()); Calendar cal = Calendar.getInstance(); cal.setTime(date); - double minutes = 60 * cal.get(Calendar.HOUR_OF_DAY) + cal.get(Calendar.MINUTE); + double minutes = 60 * 24 * (cal.get(Calendar.DAY_OF_YEAR) - 1) + 60 * cal.get(Calendar.HOUR_OF_DAY) + cal.get(Calendar.MINUTE); if (disruptions.containsKey(minutes)) { throw new RuntimeException("\n\nCONFIGURATION ERROR:" + "\nFound multiple disruption blocks in " + file + " for time " + disruption.getStartHHMM() +