chrony 设置 UTC 时间而不是本地时间

chrony 设置 UTC 时间而不是本地时间

我安装了 chrony 作为 NTP 服务器,但 Chrony 将 UTC 时间/日期设置为 NTP 客户端,而不是我当前的系统数据/时间

###############chrony.conf##############
server ntp.day.ir iburst
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
allow 192.168.3.128/26
#local stratum 10
logdir /var/log/chrony
#############timedatectl################

 Local time: Fri 2021-10-01 10:23:02 +0330
 Universal time: Fri 2021-10-01 06:53:02 UTC
 RTC time: Fri 2021-10-01 06:53:03
 Time zone: Asia/Tehran (+0330, +0330)
 NTP enabled: yes
 NTP synchronized: yes
 RTC in local TZ: no
 DST active: no
 Last DST change: DST ended at
 Tue 2021-09-21 23:59:59 +0430
 Tue 2021-09-21 23:00:00 +0330
 Next DST change: DST begins (the clock jumps one hour forward) at
 Mon 2022-03-21 23:59:59 +0330
 Tue 2022-03-22 01:00:00 +0430

############chronyc sources #############

210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^* 194.146.239.1                 4   6    37    36    -65us[+2338us] +/-  165ms
###########chronyc tracking#######################

Reference ID    : C292EF01 (194.146.239.1)
Stratum         : 5
Ref time (UTC)  : Fri Oct 01 06:54:06 2021
System time     : 0.000740993 seconds slow of NTP time
Last offset     : -0.002184254 seconds
RMS offset      : 0.002588491 seconds
Frequency       : 12.031 ppm fast
Residual freq   : +5.446 ppm
Skew            : 9.662 ppm
Root delay      : 0.126247689 seconds
Root dispersion : 0.104433782 seconds
Update interval : 65.2 seconds
Leap status     : Normal
#############ntpdate -q ntp.day.ir##################

ntpdate -q ntp.day.ir
server 194.146.239.1, stratum 4, offset 0.002601, delay 0.03836
1 Oct 10:25:11 ntpdate[7851]: adjust time server 194.146.239.1 offset 0.002601 sec
############hwclock######################
Fri 01 Oct 2021 10:26:01 AM +0330  -0.849311 seconds

答案1

NTP 始终采用 UTC,与时区无关。 chronyc将以 UTC 格式打印 NTP 参考时间。

使用其他时间和日期软件获取本地化时间,如datetimedatectl命令。

相关内容