alarm/fake-hwclock: sync hardware clock after loading date

This commit is contained in:
sprudent 2024-08-29 12:18:48 +02:00 committed by Sylvain Prudent
parent a7c94544a3
commit fab7aa2349
2 changed files with 3 additions and 2 deletions

View file

@ -6,7 +6,7 @@
pkgname=fake-hwclock
pkgver=0.3
pkgrel=1
pkgrel=1.1
pkgdesc="Saves time on shutdown and restores it on boot from a file"
arch=('any')
license=('GPL')
@ -16,7 +16,7 @@ source=('fake-hwclock.sh'
'fake-hwclock-save.service'
'fake-hwclock-save.timer')
md5sums=('713f9cd5d8dc0073b5eca5dd14de1271'
md5sums=('6af777b6c8ce7bac91a04a7a66209987'
'fa52aac3db246575c3cc8c1bf608766c'
'9f93ed2b74260d204a9c285d35ee2daa'
'b2b494cb4ba99eb12df3cb4188902ca4')

View file

@ -8,6 +8,7 @@ loadclock() {
if [ $(date +%s) -lt $savedtime ]; then
echo "Restoring saved system time"
date -s @$savedtime
hwclock --systohc
else
echo "Not restoring old system time"
fi