Development Board Modification Time Method Date command "Go"

Source: Internet
Author: User

Transferred from: http://blog.chinaunix.net/uid-25906157-id-3138157.html

Before using the board, it was discovered that the system's time was restored to its initial state for 1970 years after each boot.

First, the concept of the clock, the clock includes the hardware clock and the system clock, the system clock is the Linux system display time, with the command date can display the current system time, hardware clock is the hardware itself time. They are not related, but you can set the system clock and hardware settings by command to synchronize them. On the Linux system, set the system clock with the command date, in the format: Date 062920502008.10, which indicates that the system time is set to June 29, 2008 20:50 10 seconds. Hardware clock RTC time is set by the Hwclock command, such as hardware time to set to June 29, 2008 20:50 10 seconds, you should first use date 062920502008.10, and then with the command: Hwclock-w, So the RTC time is consistent with the system time.

Second, let the system time and RTC time synchronization. Because the system time after each boot is the original time of the system, such as January 1, 1970 1:1 1 seconds, in order to let the system time and RTC time synchronization, you can add the following command in the file system Etc/init.d/rcs:/sbin/hwclock-s, This allows the system to read the RTC at each boot time, and the system time is synchronized with the RTC time. (Hwclock may sometimes be under the/bin directory, depending on whether the BusyBox compiled after the/bin or/sbin directory)

Development Board Modification Time Method Date command "Go"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.