Re: [chrony-users] CEST time is not correct

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


I am not sure what you are worried about. system time and chrony time is ALWAYS UTC. it is
your computer which translates UTC to the local time when you ask it for the
time (eg using date). Is that what is confusing you?



William G. Unruh __| Canadian Institute for|____ Tel: +1(604)822-3273
Physics&Astronomy _|___ Advanced Research _|____ Fax: +1(604)822-5324
UBC, Vancouver,BC _|_ Program in Cosmology |____ unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1 ____|____ and Gravity ______|_ www.theory.physics.ubc.ca/

On Wed, 19 Oct 2022, Mahmood Naderan wrote:

[CAUTION: Non-UBC Email]Hi,
I have a problem with the time set on my Ubuntu 20.04 which uses chrony.  As you can see below

$ sudo hwclock --systohc
$ date Wed 19 Oct 2022 09:04:03 PM CEST
$ timedatectl status
               Local time: Wed 2022-10-19 21:04:54 CEST
           Universal time: Wed 2022-10-19 19:04:54 UTC
                 RTC time: Wed 2022-10-19 19:04:54
                Time zone: Europe/Brussels (CEST, +0200)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no
$ cat </dev/tcp/time.nist.gov/13
59871 22-10-19 17:06:38 19 0 0 388.9 UTC(NIST) *

The date command says 9 PM CEST while the correct CEST time on my watch (Brussel time) is 7 PM. So, although
the time zone is set to Brussels CEST, the time is +2 hour ahead.


Below, you can see that chrony is running while ntp is masked.

Yes, you should NEVER have them running at the same time.


$ sudo systemctl status chrony
● chrony.service - chrony, an NTP client/server
     Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-10-17 13:09:20 CEST; 2 days ago

$ sudo systemctl status ntp
● ntp.service
     Loaded: masked (Reason: Unit ntp.service is masked.)
     Active: inactive (dead) since Mon 2022-10-17 13:04:47 CEST; 2 days ago
   Main PID: 1773 (code=exited, status=0/SUCCESS)

$ cat /etc/chrony/chrony.conf
pool ntp.ubuntu.com        iburst maxsources 4
pool 0.ubuntu.pool.ntp.org iburst maxsources 1
pool 1.ubuntu.pool.ntp.org iburst maxsources 1
pool 2.ubuntu.pool.ntp.org iburst maxsources 2
keyfile /etc/chrony/chrony.keys
driftfile /var/lib/chrony/chrony.drift
logdir /var/log/chrony
maxupdateskew 100.0
rtcsync
makestep 1 3

So, I was wondering why chrony is not correctly synchronized.
Any idea about that?

Not enough information.

Run chronyc as root and then give it the command tracking.

What does it say.

What does the commend sources
say?
How long has chrony been running?
Why are you doing systohc?






Regards,
Mahmood





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