手机版

centos修改时区和同步时间

时间:2020-07-03 来源:互联网 编辑:宝哥软件园 浏览:

centos修改时区方法,centos同步时间。

输入   tzselect 选择所在的洲

centos修改时区和同步时间

选择国家

进行确认

centos同步时间

报错了。。。

You can make this change permanent for yourself by appending the line
        TZ='Asia/Seoul'; export TZ
to the file '.profile' in your home directory; then log out and log in again.

Here is that TZ value again, this time on standard output so that you
can use the /usr/bin/tzselect command in shell scripts:
Asia/Seoul

 

解决方法 :

先设置时区。再同步国际时间就可以了。。

timedatectl set-timezone Asia/Seoul

yum install -y ntpdate

ntpdate us.pool.ntp.org

 查看硬件时间

 

[root@bogon vagrant]# hwclock --show

Tue 25 Jun 2019 08:13:56 PM CST  -0.891529 seconds

 

 同步系统时间和硬件时间

 

[root@bogon vagrant]# hwclock --systohc

 

本地时间写入硬件时间

 

[root@bogon vagrant]# timedatectl set-local-rtc 1

[root@bogon vagrant]# date

Tue Jun 25 20:14:35 CST 2019

重启系统 reboot 

 

版权声明:centos修改时区和同步时间是由宝哥软件园云端程序自动收集整理而来。如果本文侵犯了你的权益,请联系本站底部QQ或者邮箱删除。

相关文章推荐