Article From:

In Linux, system time and hardware time do not synchronize automatically. System time and hardware time run asynchronously and do not interfere with each other. The operation of hardware time is maintained by Bios batteries, and the system time is automatically obtained from Bios when the system is powered on.Set to system time.

hwclock:Used to query and set hardware clock. You can view the current time, set the hardware clock, synchronize the hardware time to the system time, or set the hardware time according to the system time.

1. Command format:

  1、hwclock [functions] [options]


    -r, --show:View Hardware TimeSet: Set the hardware time to the time specified by the -- date parameter
        hwclock --set --date="TIME",Time can be a date, such as 20181111, which means only modifying the date, not modifying the time.- s, - - HC to sys: Synchronize hardware time to system time HC (Hard Clock) to sys (system)


    -w, --systohc:system(System time) to (write to) HC (Hard Clock): Synchronize system time to hardware time

     -v, --version:View the version of hwclock
    --date=date_string:Used in combination with -- set to set hardware time.


    –test :Testing, not really executing




Link of this Article: linux–hwclock

Leave a Reply

Your email address will not be published. Required fields are marked *