summaryrefslogtreecommitdiff
path: root/src/components/alarm/AlarmController.cpp
diff options
context:
space:
mode:
authorMichele Bini <michele.bini@gmail.com>2022-04-20 04:33:46 (GMT)
committerGitHub <noreply@github.com>2022-04-20 04:33:46 (GMT)
commitbe01602fcb6dc9cd91df702658c0b52da74023a9 (patch)
treebd0813acb88165deb7322201c52a259b242c49da /src/components/alarm/AlarmController.cpp
parent28f45caa11e0adbb208ba65b88b7ea399d584ba7 (diff)
parent5a13c5215c5022f036947838975c5c16b9ab268c (diff)
Merge branch 'InfiniTimeOrg:develop' into develop
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 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