Skip to content

Commit

Permalink
fix: alarm is scheduled with 12h offset (closes #33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bnyro committed Sep 8, 2023
1 parent f302f53 commit ab529a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/main/java/com/bnyro/clock/util/AlarmHelper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ object AlarmHelper {
calendar.time = TimeHelper.currentTime

// reset the calendar time to the start of the day
calendar.set(Calendar.HOUR, 0)
calendar.set(Calendar.HOUR_OF_DAY, 0)
calendar.set(Calendar.MINUTE, 0)
calendar.set(Calendar.SECOND, 0)
calendar.set(Calendar.MILLISECOND, 0)
Expand All @@ -72,7 +72,7 @@ object AlarmHelper {

// if the event has already passed for the day, schedule for the next day
if (calendar.time.time < TimeHelper.currentTime.time) {
calendar.add(Calendar.HOUR, 24)
calendar.add(Calendar.HOUR_OF_DAY, 24)
}
return calendar.timeInMillis
}
Expand Down

0 comments on commit ab529a8

Please sign in to comment.