1

I installed chrony as NTP server , but Chrony set UTC time/Date to NTP clients not My current system data/time

###############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
vidarlo
  • 6,654
  • 2
  • 18
  • 31

1 Answers1

1

NTP is always in UTC, and has nothing to do with time zones. chronyc will print NTP reference times in UTC.

Use other time and date software to get localized time, like date or timedatectl commands.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34
  • Hi. thnx for your response. how can I set my local time and date for my clients via chrony – Ehsan Ghasisin Oct 02 '21 at 09:46
  • 1
    Set time *zone* however you localized this host to be in Asia/Tehran, configure in a template VM image, or let the user set it. NTP does not understand time zones. – John Mahowald Oct 02 '21 at 17:03