Today, using virtual machines to do experiments, ntpdate countless times, time or wrong. Finally found is the time zone setting is New YORK!!!
Just record the way to modify the time zone.
1. View your system time zone
[Email protected] ~]# Date-rthu, 2016 11:57:27 +0800
[Email protected] ~]# cat/etc/sysconfig/clock zone= "Asia/shanghai"
Here we see that our time zone is in New York.
[[email protected] ~]# echo ' zone= "Asia/shanghai" ' >/etc/sysconfig/clock[[email protected] ~]# cat/etc/sysconfig/ Clockzone= "Asia/shanghai
The Linux clock setup file is:/etc/localtime, which is actually a symbolic connection to the file in the/usr/share/zoneinfo directory. Assuming we are in Shanghai, you can set the time zone as long as you run the following command.
[Email protected] ~]# ln-sf/usr/share/zoneinfo/asia/shanghai/etc/localtime[[email protected] ~]# ntpdate s2m.time.edu.cn #这个ntp服务器是北京大学的21 Jul 12:03:13 ntpdate: Adjust time server 184.108.40.206 offset 0.052517 sec
This article is from the "obsessed" blog, make sure to keep this source http://dragondragon.blog.51cto.com/6170889/1828341
Modify time zone under Linux (TIMEZONE)