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

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

Centos 6

查看系统时间:# date

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

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

2.系统时区修改:

  一、centos 6

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

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

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

  二、centos 7

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

     #  timedatectl

      

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

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

    

3.强制将时区写入bios

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

时区列表

IT运维开发路上的点点滴滴。。。
原文地址:https://www.cnblogs.com/weijie0717/p/3817796.html