1,linux系统更换时区

注:# timedatectl # 查看系统时间方面的各种状态

# timedatectl list-timezones # 列出所有时区

(1) timedatectl set-timezone Asia/Shanghai # 设置系统时区为上海

(2) cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

 

2,时间同步

ntpdate命令: 
(1) 网络时间同步命令 

ntpdate -u ntp.api.bz

ntp常用服务器: 
中国国家授时中心:210.72.145.44 
NTP服务器(上海) :ntp.api.bz

美国:time.nist.gov 
复旦:ntp.fudan.edu.cn 
微软公司授时主机(美国) :time.windows.com 
台警大授时中心(台湾):asia.pool.ntp.org

经测试中国国家授时中心与NTP上海服务器可以正常同步时间,注意需要加上-u参数!

 

相关文章:

  • 2021-05-25
  • 2021-08-19
  • 2021-06-18
  • 2022-12-23
  • 2021-08-07
  • 2021-06-09
  • 2021-12-01
  • 2022-12-23
猜你喜欢
  • 2021-08-18
  • 2021-10-15
  • 2021-07-04
  • 2022-12-23
相关资源
相似解决方案