Time settings have several related concepts: 1. rtc time/hardware Time: refers to a real-time clock (rtc) hardware device on the motherboard. this time does not contain time zone information, or the time zone in which he represents depends on & ldquo; human interpretation & rdquo; 2. system Time: this is the time recognized by the software system (here, the OS, it includes the time zone and utc time. 3. rtc time, local, and utc link settings. as mentioned above, rtc time does not contain the time zone.
There are several concepts related to time settings:
1. rtc time/hardware Time: for example, a real-time clock (rtc) hardware device on the motherboard. this time does not contain time zone information, or indicates the time zone, dependent on "manual interpretation"
2. system Time: this is the time recognized by the software system (here, the OS). It contains the time zone and utc time.
3. rtc time, local, and utc relationship settings: As mentioned above, rtc time does not contain time zone information, so let's take most of the utc + 8 zone. It is now eleven o'clock A.M.. if the rtc time is set to, the rtc time obviously corresponds to the local time in the GMT +. if the rtc time is set, it is not hard to see that rtc corresponds to the universal time (that is, the "utc synchronization time ")
The rtc time can still be stored when it is shut down, so it plays a leading role.
The relationship with the rtc time is calculated (assuming it is in the UTC + 8 zone ):
Rtc time is local time: System utc time = rtc time-8 hours, local time = rtc time
Rtc time is utc time: System utc time = rtc time, local time = rtc time + 8 hours
Which one can be set. However, it is noted that the rtc time is regarded as the local time by default in windows, so similar settings can be made in linux for unification. If no windows system exists, you can set
Settings in gentoo include:
1./usr/share/zoneinfo: time zone file related to the time zone
2./etc/localtime and/etc/timezone: Set the time zone.
Configuration example:
[Root @ localhost ~] # Cp/usr/share/zoneinfo/Asia/Shanghai/etc/localtime
Cp: overwrite '/etc/localtime '? Y
[Root @ localhost ~] #/Usr/sbin/ntpdate time.windows.com
14 Jul 13:20:15 ntpdate [18837]: adjust time server 104.41.150.68 offset-0.004899 sec
[Root @ localhost ~] # Hwclock-w
Note: hwclock-w writes the system clock to the hardware clock.