From e9d90b1e75d14f4dc7c48da234287141e30e389e Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 5 Jan 2018 20:29:24 +0100 Subject: [PATCH] Use Calendar.HOUR_OF_DAY instead of Calendar.HOUR in QuietTimeChecker Fixes #2999 --- k9mail/src/main/java/com/fsck/k9/QuietTimeChecker.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/k9mail/src/main/java/com/fsck/k9/QuietTimeChecker.java b/k9mail/src/main/java/com/fsck/k9/QuietTimeChecker.java index af11eb18b..aefed7922 100644 --- a/k9mail/src/main/java/com/fsck/k9/QuietTimeChecker.java +++ b/k9mail/src/main/java/com/fsck/k9/QuietTimeChecker.java @@ -26,7 +26,7 @@ class QuietTimeChecker { Integer endHour = Integer.parseInt(quietTimeEnd.split(":")[0]); 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 quietEnds = endHour * 60 + endMinute;