diff --git a/ntp.go b/ntp.go index a104c56..33cb32f 100644 --- a/ntp.go +++ b/ntp.go @@ -193,5 +193,9 @@ func setSystemTime(now time.Time) error { if err != nil { return fmt.Errorf("failed to run date -s: %w, %s", err, string(output)) } + output, err = exec.Command("hwclock", "-w").CombinedOutput() + if err != nil { + return fmt.Errorf("failed to run hwclock -w: %w, %s", err, string(output)) + } return nil }