summaryrefslogtreecommitdiff
path: root/src/components/alarm/AlarmController.cpp
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-04-21 14:06:42 (GMT)
committerMichele Bini <michele.bini@gmail.com>2022-04-21 14:06:42 (GMT)
commit3744e655fa94cc2efece15c3196cf8b398354ca2 (patch)
tree1040ff59e6f06fb901ba621856e28957c0b36589 /src/components/alarm/AlarmController.cpp
parent9f062635af3548425102b976e26ebbdfa998d670 (diff)
parent8ea7d77d1b1f476c890bf04b44ad9e2c858a4d1c (diff)
Merge branch 'rev22-develop' into edge
Diffstat (limited to 'src/components/alarm/AlarmController.cpp')
-rw-r--r--src/components/alarm/AlarmController.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/alarm/AlarmController.cpp b/src/components/alarm/AlarmController.cpp
index 4d20c51..cd011f6 100644
--- a/src/components/alarm/AlarmController.cpp
+++ b/src/components/alarm/AlarmController.cpp
@@ -67,7 +67,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