Loading

Linux修改CST时间为UTC时间。

1.编辑配置文件添加如下内容
[root@Centos8-template ~]# vim /etc/sysconfig/clock
ZONE="Etc/UTC"
2.生成链接
[root@Centos8-template ~]# ln -sf /usr/share/zoneinfo/UTC /etc/localtime
3. 查看时间。
[root@Centos8-template ~]# date

4.设置硬件时间和系统时间一致并校准
/sbin/hwclock --systohc
5.修改时间为shanghai,选择Asia/Shanghai
ubuntu下载如下
root@ks-master01-10:~# dpkg-reconfigure tzdata

Current default time zone: 'Asia/Shanghai'
Local time is now: Tue Aug 9 14:52:55 CST 2022.
Universal Time is now: Tue Aug 9 06:52:55 UTC 2022.

root@ks-master01-10:~#
root@ks-master01-10:~#
root@ks-master01-10:~# date
Tue Aug 9 14:52:59 CST 2022

posted @ 2021-11-25 12:54  梨花海棠  阅读(2106)  评论(0编辑  收藏  举报