博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CentOS 修改系统时区
阅读量:4228 次
发布时间:2019-05-26

本文共 841 字,大约阅读时间需要 2 分钟。

新安装 centOS 系统后,可能会出现由于时区问题,导致时间与现有正常时间相差 8 个小时的情况。我们可以通过相应的命令来重新设置时区。

[root@master ~]# timedatectl               Local time: Mon 2021-01-25 07:03:18 UTC           Universal time: Mon 2021-01-25 07:03:18 UTC                 RTC time: Mon 2021-01-25 07:03:32                Time zone: UTC (UTC, +0000)System clock synchronized: no              NTP service: active          RTC in local TZ: no

1、查看时间各种状态:

[root@master ~]# timedatectl      Local time: Mon 2021-01-25 14:57:51 CST  Universal time: Mon 2021-01-25 06:57:51 UTC        RTC time: Mon 2021-01-25 06:57:51       Time zone: Asia/Shanghai (CST, +0800)     NTP enabled: yesNTP synchronized: yes RTC in local TZ: no      DST active: n/a

2、 列出所有时区:

timedatectl list-timezones

3、将硬件时钟调整为与本地时钟一致, 0 为设置为 UTC 时间:

timedatectl set-local-rtc 1

4、设置系统时区为上海:

timedatectl set-timezone Asia/Shanghai

 

转载地址:http://yijqi.baihongyu.com/

你可能感兴趣的文章
Microsoft SQL Server 2005 Reporting Services 2005
查看>>
User Mode Linux(R) (Bruce Perens Open Source)
查看>>
Enterprise JavaBeans 3.0 (5th Edition)
查看>>
Eclipse 3 Live
查看>>
Java P2P Unleashed: With JXTA, Web Services, XML, Jini, JavaSpaces, and J2EE
查看>>
Java(TM) Network Programming and Distributed Computing
查看>>
Java Cookbook
查看>>
Intelligent Agent Software Engineering
查看>>
Project Management Training
查看>>
Microsoft Reporting Services in Action
查看>>
Successful Software Development (2nd Edition)
查看>>
How to Design Programs: An Introduction to Programming and Computing
查看>>
Beginning Relational Data Modeling, Second Edition
查看>>
Winternals Defragmentation, Recovery, and Administration Field Guide
查看>>
Video Conferencing over IP : Configure, Secure, and Troubleshoot
查看>>
Pro ASP.NET 2.0 Website Programming
查看>>
Disassembling Code : IDA Pro and SoftICE
查看>>
Building Online Communities With Drupal, phpBB, and WordPress
查看>>
C# 2.0 : The Complete Reference
查看>>
Digital Character Animation 3
查看>>