Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fake-hwclock: Add hwclock --systohc to synchronize hardware clock #2058

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sprudent
Copy link

Description

This PR adds the command hwclock --systohc to the fake-hwclock script located in /usr/lib/systemd/scripts/fake-hwclock.sh. The purpose of this addition is to ensure that after restoring the system time from the saved state, the hardware clock (RTC) is synchronized with the system time. This is crucial for maintaining accurate timekeeping on systems without a reliable RTC, especially in cases where the system may be rebooted or powered off frequently.

Rationale

The fake-hwclock package is intended to simulate an RTC on systems that lack one. However, after restoring the system time, there is currently no step that updates the actual hardware clock with the restored time. By adding hwclock --systohc, we ensure that the RTC is kept in sync with the restored time, improving the reliability of timekeeping across reboots.

Changes Introduced

  • The fake-hwclock.sh script now includes the command hwclock --systohc immediately after the time is restored using date -s @$savedtime.

Compliance

  • pkgver remains unchanged as this is a minor enhancement.
  • pkgrel has been incremented to 1.1 to reflect the change and ensure proper tracking against upstream.
  • Checksums have been verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant