]> git.ipfire.org Git - thirdparty/util-linux.git/commit
rtcwake: fix sys vs. rtc time delta usage
authorKarel Zak <kzak@redhat.com>
Mon, 27 Nov 2017 11:37:53 +0000 (12:37 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Dec 2017 14:40:59 +0000 (15:40 +0100)
commit9feec6c2a0229ddae3c5f90ee9f790208c100a2c
tree7ed0acb8ce375337163e649bbda871121bd896a1
parent32337d96b1fda2d8bfff753277f45a1ba0ee118c
rtcwake: fix sys vs. rtc time delta usage

srett commented:

 After some head scratching why relative wakeup using -s always works
 while -t didn't seem to work at all I discovered that the adjustment
 for time difference between sys and rtc is actually inverted when
 writing the alarm (code for -m show reading is fine), so if the RTC
 lags 10 minutes behind, the alarm will be shifted into the future by
 10 minutes, resulting in a wakeup that is 20 minutes late.

Addresses: https://github.com/karelzak/util-linux/issues/544
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/rtcwake.c