1.系统时间查看及修改:

Centos 6

查看系统时间:# date

centos 系统下查看时间时区以及修改

将系统日期修改为2014-7-2  :# date -s  月/日/年

centos 系统下查看时间时区以及修改

系统时间设置为 上午10:20: # date -s 10:20

centos 系统下查看时间时区以及修改

2.系统时区修改:

  一、centos 6

    1、查看系统时区:#date -R   (+0800 为东八区)

centos 系统下查看时间时区以及修改

 

    2、修改时区(将重庆改为系统时区):# cp -f /usr/share/zoneinfo/Asia/Chongqing /etc/localtime    #同时适用于Centos7

centos 系统下查看时间时区以及修改

      提示是否要覆盖,输入y 确定。

  二、centos 7

    1、在Centos 7 中引入了一个叫 timedatectl 的设置设置程序.用法很简单:

     #  timedatectl

      centos 系统下查看时间时区以及修改

    2、timedatectl set-local-rtc 1   # 将硬件时钟调整为与本地时钟一致, 0 为设置为 UTC 时间

    3、timedatectl set-timezone Asia/Shanghai   # 设置系统时区为上海

    

3.强制将时区写入bios

修改完成后操作:# clock -w

centos 系统下查看时间时区以及修改

 

时区列表

 

相关文章:

  • 2021-06-30
  • 2021-11-23
  • 2021-11-19
  • 2021-10-30
  • 2021-06-27
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-02-02
  • 2022-12-23
  • 2021-07-18
  • 2022-02-08
  • 2021-07-04
  • 2022-12-23
  • 2022-01-20
相关资源
相似解决方案