Use Calendar.HOUR_OF_DAY instead of Calendar.HOUR in QuietTimeChecker

Fixes #2999
This commit is contained in:
cketti 2018-01-05 20:29:24 +01:00
parent 8fd6a4c83a
commit e9d90b1e75

View file

@ -26,7 +26,7 @@ class QuietTimeChecker {
Integer endHour = Integer.parseInt(quietTimeEnd.split(":")[0]); Integer endHour = Integer.parseInt(quietTimeEnd.split(":")[0]);
Integer endMinute = Integer.parseInt(quietTimeEnd.split(":")[1]); Integer endMinute = Integer.parseInt(quietTimeEnd.split(":")[1]);
Integer now = (gregorianCalendar.get(Calendar.HOUR) * 60) + gregorianCalendar.get(Calendar.MINUTE); Integer now = (gregorianCalendar.get(Calendar.HOUR_OF_DAY) * 60) + gregorianCalendar.get(Calendar.MINUTE);
Integer quietStarts = startHour * 60 + startMinute; Integer quietStarts = startHour * 60 + startMinute;
Integer quietEnds = endHour * 60 + endMinute; Integer quietEnds = endHour * 60 + endMinute;