Today I met, a difference of eight hours,,, Tzselect had not, but also have to use ntupdate nuclear.
Online search, prepared for a rainy.
~~~~~~~~~~~~~~~~
1. In Linux, when viewing time with date display:
Wednesday, February 17, 2013 19:04:14 CST
World Coordination Time (Universal times COORDINATED,UTC):
There are two kinds of time difference in GPS system, one is UTC, the other is LT (local time) is different from time zone, UTC is the time of 0 time zone, local time, such as Beijing, eight in the morning (East eight), UTC time is 0 points, time is eight hours later than in Beijing, in order to calculate.
Under Linux, you can set the current system time zone step by run by running the command Tzselect and then entering the number in front of the option.
If you do not have an NTP server installed, you just need to execute the following command first:
Yum install NTP
Synchronization time using the Ntpdate command is as follows:
ntpdate cn.pool.ntp.org
2. After we install the CentOS Linux operating system, the time of clicking on the system is not consistent with the time now used, 8 hours, While installing the system, we select the time zone is Shanghai, but the CentOS Linux default Bios time is UTC time (UTC is Coordinated Universal Time (UNIVERSAL) English abbreviation, is the international Radio Advisory Committee stipulated and recommended, And by the International Time Bureau (BIH) is responsible for maintaining the time scale based on the second. UTC is equivalent to the average sun on the Prime meridian (that is, longitude 0 degrees), which used to be expressed in Greenwich Mean Time (GMT). Beijing time is 8 hours earlier than UTC time, with January 1, 1999 0000UTC as an example, UTC time is 0 points and Beijing time is January 1, 1999 8 o'clock in the morning. ), so we were 8 hours apart on time. At this time the BIOS time and the system time are of course inconsistent, one represents UTC time, and one represents the CST (+8 time zone), which is the time of Shanghai.
In the CentOS Linux Terminal command, execute the following command:
1). Vi/etc/sysconfig/clock #编辑时间配置文件
Zone= "Asia/shanghai"
Utc=false #设置为false, hardware clock is not the same as UTC time
Arc=false
2). ln-sf/usr/share/zoneinfo/asia/shanghai/etc/localtime #linux的时区设置为上海时区
3). ntpdate cn.pool.ntp.org #对准时间
4)./sbin/hwclock--SYSTOHC #设置硬件时间和系统时间一致并校准
After the above steps, our CentOS Linux system time and computer hardware time are finally CST time, and are all in Shanghai time zone.
The difference between CST and UTC time under Linux/centos and the resolution of inconsistencies