Re: [chrony-users] System Clock is updated before the TAI-UTC offset is applied for PHC source in chrony 6.4.1

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Strange you should mention this - I had the same problem… 

Some suggestions that I found. 

Chrony Version : chronyc (chrony) version 4.6.1 (+READLINE +SECHASH +IPV6 -DEBUG)

I also had an issue with Debian (so assume rasping) so check the following.. 
I had some weird symlinks that were not created - I think the Etc/UCT - but it looks like it might be broken in Debian based distros… 

cat /usr/share/zoneinfo/right/UTC.src 
# UTC with leap-second support
Zone UTC 0 - UTC

root@31perkins:/usr/share/zoneinfo# ls -la
total 272
drwxr-xr-x  14 root root   4096 Nov 24 20:52 .
drwxr-xr-x 146 root root   4096 Jan  8 22:30 ..
drwxr-xr-x   2 root root   4096 Oct 31 21:03 Africa
drwxr-xr-x   6 root root  20480 Oct 31 21:03 America
drwxr-xr-x   2 root root   4096 Oct 31 21:03 Antarctica
drwxr-xr-x   2 root root   4096 Oct 31 21:03 Arctic
drwxr-xr-x   2 root root  12288 Oct 31 21:03 Asia
drwxr-xr-x   2 root root   4096 Oct 31 21:03 Atlantic
drwxr-xr-x   2 root root   4096 Oct 31 21:03 Australia
drwxr-xr-x   2 root root   4096 Oct 31 21:03 Etc
drwxr-xr-x   2 root root  12288 Oct 31 21:03 Europe
-rw-r--r--   1 root root    116 Aug 25 08:12 Factory
lrwxrwxrwx   1 root root      7 Aug 25 08:12 GMT -> Etc/GMT
drwxr-xr-x   2 root root   4096 Oct 31 21:03 Indian
-rw-r--r--   1 root root   4791 Sep  7  2023 iso3166.tab
-rw-r--r--   1 root root   3253 Aug 25 08:12 leapseconds
-rw-r--r--   1 root root   5065 Aug 25 08:12 leap-seconds.list
lrwxrwxrwx   1 root root     14 Aug 25 08:12 localtime -> /etc/localtime
drwxr-xr-x   2 root root   4096 Oct 31 21:03 Pacific
lrwxrwxrwx   1 root root     16 Aug 25 08:12 posixrules -> America/New_York
drwxr-xr-x   2 root root   4096 Nov 24 20:54 right
-rw-r--r--   1 root root 114396 Aug 25 08:12 tzdata.zi
lrwxrwxrwx   1 root root      7 Aug 25 08:12 UTC -> Etc/UTC
-rw-r--r--   1 root root  17597 Mar 21  2025 zone1970.tab
-rw-r--r--   1 root root   8084 Mar 23  2025 zonenow.tab
-rw-r--r--   1 root root  18822 Mar 21  2025 zone.tab
root@31perkins:/usr/share/zoneinfo# cat Etc/
GMT        GMT0       GMT+10     GMT-11     GMT-13     GMT-2      GMT+4      GMT-5      GMT+7      GMT-8      Greenwich  UTC        
GMT+0      GMT+1      GMT-10     GMT+12     GMT-14     GMT+3      GMT-4      GMT+6      GMT-7      GMT+9      UCT        Zulu       
GMT-0      GMT-1      GMT+11     GMT-12     GMT+2      GMT-3      GMT+5      GMT-6      GMT+8      GMT-9      Universal  
root@31perkins:/usr/share/zoneinfo# cat Etc/UTC 
TZif2UTCTZif2UTC
UTC0
root@31perkins:/usr/share/zoneinfo# 
——

cat /etc/chrony/chrony.conf
# Welcome to the chrony configuration file. See chrony.conf(5) for more
# information about usable directives.

# Include configuration files found in /etc/chrony/conf.d.
confdir /etc/chrony/conf.d

# Primary high-precision reference: PHC (Stratum 1)
#refclock PHC /dev/ptp0 poll 0 dpoll 0 offset 0 tai prefer
refclock PHC /dev/ptp0 poll 0 dpoll 0 offset 0 tai prefer precision 1e-9 filter 16 minsamples 32

# Optional fallback: public Stratum 1 NTP server (do NOT prefer)
server time-a.nist.gov iburst minpoll 6 maxpoll 10
server pool.msltime.measurement.govt.nz iburst minpoll 6 maxpoll 10


# Use time sources from DHCP.
sourcedir /run/chrony-dhcp

# Allow local LAN access
allow

# Use NTP sources found in /etc/chrony/sources.d.
sourcedir /etc/chrony/sources.d

# Authentication key file (if needed)
keyfile /etc/chrony/chrony.keys

# Store system clock drift
driftfile /var/lib/chrony/chrony.drift

# Save NTS keys and cookies
ntsdumpdir /var/lib/chrony

# Logging (optional — uncomment to enable)
#log tracking measurements statistics

# Log files location
logdir /var/log/chrony

# Stop bad estimates upsetting machine clock
maxupdateskew 5.0

# Kernel RTC synchronization (every 11 minutes)
rtcsync

# Step the system clock if offset > 1 second, but only in first 3 updates
makestep 0.1 -1

# Use TAI / UTC leap seconds from system timezone database
leapsectz right/UTC

lock_all
sched_priority 1
chris@ptp:~$ 




> On 16 Jan 2026, at 19:28, Simon Plackett <plackettsj1@xxxxxxxxx> wrote:
> 
> Hi,
> 
> Before I send a lot of detail I wondered if anyone had seen this
> phenomenon. I have just upgraded my local chrony server to Trixie on
> RPI 5 with chrony 4.6.1.
> 
> I had previously been using the ethernet NIC clock as a time source
> with ptp4l and phc2sys, which worked fine.
> 
> During the upgrade I changed to leapseclist from leapsectz as the
> latter does not work on Trixie.
> 
> The issue is that on startup the system clock is set by the PHC source
> before the TAI-UTC adjustment has been applied which means it jumps
> 36+ seconds one way and then back again during the startup. This
> obviously trashes the PHC as a source, and it didn't happen
> previously.
> 
> Essentially PHC is chosen as the source, updates system clock (wrong
> by ~37s) then the TAI-UTC adjustment is found which causes system time
> to jump again in the opposite direction by ~37s
> 
> I can see this using systemctl status chrony or using journalctl.
> 
> I have currently turned PHC off again - but happy to turn back on and
> send any logs etc that might be useful.
> 
> The other source is PPS from GPS, which is even more accurate on the
> new versions :-)
> 
> Thanks
> Simon
> 
> -- 
> To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
> with "unsubscribe" in the subject.
> For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx 
> with "help" in the subject.
> Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.
> 


--
To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "unsubscribe" in the subject.
For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx
with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/