the time setting has several related concepts:
1, RTC Time/Hardware time: Refers to a real-time clock (RTC) hardware Device on the motherboard, this time is no time zone information, or he said which time zone, depends on "human interpretation"
2, System time: This is the software system (this refers to the OS) cognitive time, he contains the time zone and UTC time two parts
3, RTC time, local, UTC relationship settings: As mentioned above, RTC time does not have time zone information, take most of us in the East eight area. It is now 11 o'clock in the morning, if RTC time is set to 11 points, the RTC time obviously corresponds to the local time in the East eight region, and if RTC is set to 3 in the morning, it is not difficult to see that RTC corresponds to Universal Time (known as UTC sync time)
RTC Time is maintained in the shutdown state, so it plays a leading role, and other times are borrowed by RTC time and "
The relationship with RTC Time "is calculated (assuming in the East eight 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
In fact, it is possible to set any kind. However, notice that the Windows system defaults to the RTC time as local time, so for the sake of unification, similar settings can be made in the Linux system. If no Windows system exists, you can set the
The Gentoo settings include:
1,/usr/share/zoneinfo: Time zone files related to time zones
2,/etc/localtime and/etc/timezone: setting time zone information
Examples of specific settings:
[Email protected] ~]# Cp/usr/share/zoneinfo/asia/shanghai/etc/localtime
Cp:overwrite '/etc/localtime '? Y
[Email protected] ~]#/usr/sbin/ntpdate time.windows.com
Jul 13:20:15 ntpdate[18837]: Adjust time server 104.41.150.68 offset-0.004899 sec
[Email protected] ~]# hwclock-w
Note: Hwclock-w writes the system clock to the hardware clock
Modify time zone and time for the CentOS system optimization series