当前位置:首页 - Linux

centos 如何修改时区?

作者:高景洋 日期:2023-03-21 09:59:19 浏览次数:436
1.查看时区与时间
#date -R

2.手工修改系统时间
#date -s 20230321

#date -s 23:40:00

3.手工修改系统时区
#cp /usr/share/zoneinfo/Asia/Shanghai   /etc/localtime

4.同步阿里云的时钟源
#ntpdate   ntp1.aliyun.com

5.将当前时间和日期写入BIOS,避免重启后失效
#hwclock -w
本文永久性链接:
<a href="http://r4.com.cn/art226.aspx">centos 如何修改时区?</a>
当前header:Host: r4.com.cn X-Host1: r4.com.cn X-Host2: r4.com.cn X-Host3: 127.0.0.1:8080 X-Forwarded-For: 44.210.83.132 X-Real-Ip: 44.210.83.132 X-Domain: r4.com.cn X-Request: GET /art226.aspx HTTP/1.1 X-Request-Uri: /art226.aspx Connection: close User-Agent: CCBot/2.0 (https://commoncrawl.org/faq/) Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 If-Modified-Since: Mon, 02 Oct 2023 07:01:23 GMT Accept-Encoding: br,gzip