diff options
| author | Max Friedrich <minacode@users.noreply.github.com> | 2022-04-18 22:40:29 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-04-18 22:40:29 (GMT) |
| commit | f84a0a38972e6b6d9a537dc9de2e2c416312f882 (patch) | |
| tree | 3ce9dab83f8b6af8e9df1c8d3aa0219f5a67acbe /src/components/alarm/AlarmController.cpp | |
| parent | a1db9fca136493eef38e536abaa660dd6ce23e57 (diff) | |
| parent | ed91b5a9981898078ad8e4cf105b5d52c7b63dfe (diff) | |
Merge branch 'develop' into remove-nm-reference
Diffstat (limited to 'src/components/alarm/AlarmController.cpp')
| -rw-r--r-- | src/components/alarm/AlarmController.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/alarm/AlarmController.cpp b/src/components/alarm/AlarmController.cpp index 28b328d..11d96e7 100644 --- a/src/components/alarm/AlarmController.cpp +++ b/src/components/alarm/AlarmController.cpp @@ -54,7 +54,8 @@ void AlarmController::ScheduleAlarm() { auto now = dateTimeController.CurrentDateTime(); alarmTime = now; - time_t ttAlarmTime = std::chrono::system_clock::to_time_t(alarmTime); + time_t ttAlarmTime = std::chrono::system_clock::to_time_t( + std::chrono::time_point_cast<std::chrono::system_clock::duration>(alarmTime)); tm* tmAlarmTime = std::localtime(&ttAlarmTime); // If the time being set has already passed today,the alarm should be set for tomorrow |
