Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
frankzhangv5 committed Jun 28, 2019
1 parent 33a8aa6 commit 0c97d08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified app/release/app-release.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions app/src/main/java/com/iq56/poweronofftimer/AlarmService.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private void setDailyAlarm() {
int[] poweronTime = {year, month, day, powerOnHour, powerOnMinute};
int[] poweroffTime = {year, month, day, powerOffHour, powerOffMinute};

if (powerOnHour < hour || (powerOnHour == hour && powerOnMinute < minute)) {
if (powerOnHour < hour || (powerOnHour == hour && powerOnMinute <= minute)) {
poweronTime[2] += 1;
}

Expand Down Expand Up @@ -160,7 +160,7 @@ private void setWeeklyAlarm(int deltaDays) {
break;
}
}
if (powerOnHour < hour || (powerOnHour == hour && powerOnMinute < minute)) {
if (powerOnHour < hour || (powerOnHour == hour && powerOnMinute <= minute)) {
poweronTime[2] += delta;
}

Expand Down

0 comments on commit 0c97d08

Please sign in to comment.