Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f5e5ff9 authored by James Lemieux's avatar James Lemieux Committed by Android (Google) Code Review
Browse files

Merge "Account for DST when scheduling alarms" into ub-deskclock-dazzle

parents 5f641d64 9699c4ab
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -391,6 +391,12 @@ public final class Alarm implements Parcelable, ClockContract.AlarmsColumns {
        if (addDays > 0) {
            nextInstanceTime.add(Calendar.DAY_OF_WEEK, addDays);
        }

        // Daylight Savings Time can alter the hours and minutes when adjusting the day above.
        // Reset the desired hour and minute now that the correct day has been chosen.
        nextInstanceTime.set(Calendar.HOUR_OF_DAY, hour);
        nextInstanceTime.set(Calendar.MINUTE, minutes);

        return nextInstanceTime;
    }