zoukankan      html  css  js  c++  java
  • 修改centos系统时间

    1.查看当前的系统时间, 发现当前时间与标准时间不一致

    [root@hadoop3 ~]# date
    2020年 12月 16日 星期三 22:33:30 CST
    [root@hadoop3 ~]# 

    2. 查看当前时区

    [root@hadoop3 ~]# timedatectl status
          Local time: 三 2020-12-16 22:30:43 CST
      Universal time: 三 2020-12-16 14:30:43 UTC
            RTC time: 三 2020-12-16 22:30:43
           Time zone: Asia/Shanghai (CST, +0800)
         NTP enabled: yes
    NTP synchronized: yes
     RTC in local TZ: yes
          DST active: n/a
    
    Warning: The system is configured to read the RTC time in the local time zone.
             This mode can not be fully supported. It will create various problems
             with time zone changes and daylight saving time adjustments. The RTC
             time is never updated, it relies on external facilities to maintain it.
             If at all possible, use RTC in UTC by calling
             'timedatectl set-local-rtc 0'.

    按照提示,修改rtc为utc

    timedatectl set-local-rtc 0

    3. 修改系统时间为正确的时间

    date -s "2020-12-16 22:36:00"

    4.如果时区不对,可以修改一下时区

    timedatectl set-timezone Asia/Shanghai

    5.重启 reboot



  • 相关阅读:
    hdu 4297 One and One Story 夜
    hdu 4280 Island Transport 夜
    1389. Roadworks 夜
    hdu 4289 Control 夜
    hdu 4291 A Short problem 夜
    hdu 4284 Travel 夜
    1080. Map Coloring 夜
    正则中的转义符\
    起重复出现作用的量词*和+
    安卓的权限大全和动态使用安卓权限
  • 原文地址:https://www.cnblogs.com/jay1987/p/14146729.html
Copyright © 2011-2022 走看看