Change the system time of the US vps to Beijing time.
When using vps outside China, you may feel that the time on vps is not Beijing time and it is awkward. Today we will change it back to Beijing time. First, log on to your vps, use the date command to view the current time
[root@centos ~]#date Sun Aug 14 23:18:41 EDT 2011
Now let's change it.
[root@centos ~]# rm -rf /etc/localtime [root@centos ~]# ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
Run the date command to check if your vps time has changed? Most vps hens allow each vps to change the time! Check that the vpsma time has been modified.
[root@centos ~]# date Mon Aug 15 11:20:00 CST 2011
If your vps time has been changed to Beijing time, you don't have to look at the following. If your vps time has not been modified yet. Try again:
[root@centos ~]# ntpdate stdtime.sinica.edu.tw
If this command is prompted when ntpdate stdtime.sinica.edu.tw is used, install ntpdate first.
Centos system vps command:
yum -y install ntpdate ntp
For Ubuntu:
sudo apt-get install -y ntpdate ntp
After the installation is complete, try the command again. If not, it is generally because the hen has made settings so that you do not want to modify the vps time.