If we use the U.S. VPS Host Station we will find some VPS, some sites submitted time and we are different, the adoption of the United States time, rather than the Beijing time we need, this problem is mainly due to the current VPS system time zone settings problem. We need to manually adjust to solve the problem.
First step, modify system date
Date-s 04/09/2014
We set the date of the system to today September 4, 2014
Step two, modify the current system time
Date-s 12:41:20
Set current time, hour, minute, second
Step three, replace the time zone and edit
Cp-f/usr/share/zoneinfo/asia/shanghai/etc/localtime
Vi/etc/sysconfig/clock
Add the following to the clock file
Zone= "Asia/shanghai"
Finally, we use the date command to look at the current time in line with Beijing time.
Add some examples of Linux time fixes
Correction of time zone
Rm-rf/etc/localtime #删除当前默认时区www. 111cn.net
Ln-s/usr/share/zoneinfo/asia/shanghai/etc/localtime
#复制替换默认时区为上海
SSH executes the above command to change the VPS time zone to Shanghai's time zone, and, of course, to set up Hong Kong or Beijing in China.
Second, manual correction time
Date-s ' 09:16:00 2013-01-21 '
Using the date command, the modification time and date is January 21, 2013, and the time is 9:16 A.M. 0 seconds.
Three, time automatic synchronization and correction
Yum install-y NTP #安装时间同步服务 (components)
Ntpdate us.pool.ntp.org #设置同步服务器
Date #查看当前时间www. 111cn.net
The NTP service is already installed in some systems, and the NTP server correction time is automatically connected based on the time zone (first operation) of the current record.