linux时间有2种,rtc时钟与系统时钟。Rtc时钟是不断电的,一般由纽扣(锂)电池供电,关机后也处于供电状态。在开机时,会取rtc时间赋值给系统时间,之后系统时间独立运作。休眠时,会把系统时间与rtc时间的差值给保存起来,然后唤醒的时候把差值加上唤醒时的rtc时间再赋值给系统时间,也就是状态栏上显示的时间值。
[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
- 上一篇:网上找到oracle Check SQL
- 下一篇:Linux NUMA技术



