博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
CentOS 7系统时间与实际时间差8个小时
阅读量:2159 次
发布时间:2019-05-01

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

1、查看系统时间:

 

[root@localhost sysconfig]# timedatectl

      Local time: 一 2017-11-06 21:13:19 CST
  Universal time: 一 2017-11-06 13:13:19 UTC
        RTC time: 一 2017-11-06 13:13:19
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: no
NTP synchronized: no
 RTC in local TZ: no
      DST active: n/a
发现系统时间和Universal time时间相差8个小时;
2、查看系统时区:

 

[root@localhost sysconfig]# ls /usr/share/zoneinfo/

Africa      Brazil   Egypt    GB-Eire    HST          Japan      Navajo    posixrules  Turkey     zone1970.tab
America     Canada   Eire     GMT        Iceland      Kwaj
3、删除当前系统所处的分区:

 

[root@localhost sysconfig]# sudo rm /etc/localtime

4、从/usr/share/zoneinfo/中创建软连接以替换当前的时区信息,直接选择Universal:

[root@localhost sysconfig]# sudo ln -s /usr/share/zoneinfo/Universal /etc/localtime

5、再次查看系统时间

[root@localhost sysconfig]# sudo timedatectl

      Local time: 一 2017-11-06 13:14:32 UTC
  Universal time: 一 2017-11-06 13:14:32 UTC
        RTC time: 一 2017-11-06 13:14:32
       Time zone: Universal (UTC, +0000)
     NTP enabled: no
NTP synchronized: no
 RTC in local TZ: no
      DST active: n/a
 

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

你可能感兴趣的文章
检测iOS的网络可用性并打开网络设置
查看>>
简单封装FMDB操作sqlite的模板
查看>>
iOS开发中Instruments的用法
查看>>
iOS常用宏定义
查看>>
什么是ActiveRecord
查看>>
有道词典for mac在Mac OS X 10.9不能取词
查看>>
关于“团队建设”的反思
查看>>
利用jekyll在github中搭建博客
查看>>
Windows7中IIS简单安装与配置(详细图解)
查看>>
linux基本命令
查看>>
BlockQueue 生产消费 不需要判断阻塞唤醒条件
查看>>
强引用 软引用 弱引用 虚引用
查看>>
数据类型 java转换
查看>>
"NetworkError: 400 Bad Request - http://172.16.47.117:8088/rhip/**/####t/approval?date=976
查看>>
mybatis 根据 数据库表 自动生成 实体
查看>>
win10将IE11兼容ie10
查看>>
checkbox设置字体颜色
查看>>
第一篇 HelloWorld.java重新学起
查看>>
ORACLE表空间扩张
查看>>
orcal 循环执行sql
查看>>