签到成功

知道了

CNDBA社区CNDBA社区

timedatectl

2021-12-10 10:31 2979 0 原创 Linux
作者: hbhe0316

linux时间有2种,rtc时钟与系统时钟。Rtc时钟是不断电的,一般由纽扣(锂)电池供电,关机后也处于供电状态。在开机时,会取rtc时间赋值给系统时间,之后系统时间独立运作。休眠时,会把系统时间与rtc时间的差值给保存起来,然后唤醒的时候把差值加上唤醒时的rtc时间再赋值给系统时间,也就是状态栏上显示的时间值。

http://www.cndba.cn/hbhe0316/article/22730
http://www.cndba.cn/hbhe0316/article/22730http://www.cndba.cn/hbhe0316/article/22730
http://www.cndba.cn/hbhe0316/article/22730
http://www.cndba.cn/hbhe0316/article/22730
http://www.cndba.cn/hbhe0316/article/22730
http://www.cndba.cn/hbhe0316/article/22730
http://www.cndba.cn/hbhe0316/article/22730
http://www.cndba.cn/hbhe0316/article/22730
http://www.cndba.cn/hbhe0316/article/22730

[root@node02:/root]$ timedatectl status
      Local time: Fri 2021-12-10 10:23:16 CST
  Universal time: Fri 2021-12-10 02:23:16 UTC
        RTC time: Fri 2021-12-10 10:23:16
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: no
NTP synchronized: no
 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'.
[root@node02:/root]$ timedatectl set-local-rtc 0
[root@node02:/root]$ timedatectl status
      Local time: Fri 2021-12-10 10:25:58 CST
  Universal time: Fri 2021-12-10 02:25:58 UTC
        RTC time: Fri 2021-12-10 02:25:58
       Time zone: Asia/Shanghai (CST, +0800)
     NTP enabled: no
NTP synchronized: no
 RTC in local TZ: no
      DST active: n/a

版权声明:本文为博主原创文章,未经博主允许不得转载。

linux

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:2646508次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ