From 86015dea277451199533deb3e67ebcecd8d116ba Mon Sep 17 00:00:00 2001 From: Inkyun Kil Date: Mon, 23 Sep 2019 15:53:31 +0900 Subject: [PATCH] Fix localtime issue for adjusting milliseconds Change-Id: I49de2b22e4701e6c99893bb016176b8b91a5512c Signed-off-by: Inkyun Kil --- lib/alarm-lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/alarm-lib.c b/lib/alarm-lib.c index 30c7748..baabca2 100644 --- a/lib/alarm-lib.c +++ b/lib/alarm-lib.c @@ -479,8 +479,9 @@ static void __adjust_current_milliseconds(alarm_info_t *alarm_info) start_tm.tm_hour = alarm_info->start.hour; start_tm.tm_min = alarm_info->start.min; start_tm.tm_sec = alarm_info->start.sec; + start_tm.tm_isdst = -1; - start = mktime(&start_tm); + start = timegm(&start_tm); if (current_time.tv_sec == start) { start += 1; -- 2.7.4