summaryrefslogtreecommitdiff
path: root/util-linux/rtcwake.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/rtcwake.c')
-rw-r--r--util-linux/rtcwake.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c
index 049f699..64c3e7e 100644
--- a/util-linux/rtcwake.c
+++ b/util-linux/rtcwake.c
@@ -160,7 +160,12 @@ int rtcwake_main(int argc UNUSED_PARAM, char **argv)
/* relative or absolute alarm time, normalized to time_t */
sys_time = time(NULL);
- rtc_time = rtc_read_time(fd, utc);
+ {
+ struct tm tm;
+ rtc_read_tm(&tm, fd);
+ rtc_time = rtc_tm2time(&tm, utc);
+ }
+
if (alarm_time) {
if (alarm_time < sys_time)