1

I use Arch Linux OS with Linux 5.4.61-1-lts kernel, x86-64.

I noticed, that my UTC time is wrong:

[tao@dc ~]$ timedatectl
               Local time: Sun 2020-08-30 12:15:41 EEST 
           Universal time: Sun 2020-08-30 09:15:41 UTC  
                 RTC time: Sun 2020-08-30 09:15:41      
                Time zone: Europe/Chisinau (EEST, +0300)
System clock synchronized: no                           
              NTP service: inactive                     
          RTC in local TZ: no 

while here I see 06:15:41.

I found only one way to change UTC time - using ntp:

[tao@dc ~]$ sudo ntpd -qg
[sudo] password for tao: 
30 Aug 12:20:15 ntpd[3371]: ntpd [email protected] Wed Jul  1 17:02:17 UTC 2020 (1): Starting
30 Aug 12:20:15 ntpd[3371]: Command line: ntpd -qg
30 Aug 12:20:15 ntpd[3371]: ----------------------------------------------------
30 Aug 12:20:15 ntpd[3371]: ntp-4 is maintained by Network Time Foundation,
30 Aug 12:20:15 ntpd[3371]: Inc. (NTF), a non-profit 501(c)(3) public-benefit
30 Aug 12:20:15 ntpd[3371]: corporation.  Support and training for ntp-4 are
30 Aug 12:20:15 ntpd[3371]: available at https://www.nwtime.org/support
30 Aug 12:20:15 ntpd[3371]: ----------------------------------------------------
30 Aug 12:20:15 ntpd[3371]: proto: precision = 0.232 usec (-22)
30 Aug 12:20:15 ntpd[3371]: basedate set to 2020-06-19
30 Aug 12:20:15 ntpd[3371]: gps base set to 2020-06-21 (week 2111)
30 Aug 12:20:15 ntpd[3371]: Listen and drop on 0 v6wildcard [::]:123
30 Aug 12:20:15 ntpd[3371]: Listen and drop on 1 v4wildcard 0.0.0.0:123
30 Aug 12:20:15 ntpd[3371]: Listen normally on 2 lo 127.0.0.1:123
30 Aug 12:20:15 ntpd[3371]: Listen normally on 3 wlp2s0 192.168.100.5:123
30 Aug 12:20:15 ntpd[3371]: Listen normally on 4 lo [::1]:123
30 Aug 12:20:15 ntpd[3371]: Listen normally on 5 wlp2s0 [fe80::5aee:76d3:f600:ccc7%3]:123
30 Aug 12:20:15 ntpd[3371]: Listening on routing socket on fd #22 for interface updates
30 Aug 09:20:21 ntpd[3371]: ntpd: time set -10800.518742 s
ntpd: time set -10800.518742s
[tao@dc ~]$ 

But problem is that after reboot this change dumps. I would like to change permanently UTC time. I wouldn't like to put script somewhere in startup, I want to sort out this problem. Thank you for reading.

2 Answers 2

0

"Universal time" represents the system clock, which can be adjusted manually using various tools, such as date --utc --set="hh:mm" or timedatectl set-time "hh:mm UTC". You're not required to use ntpd for this, although using NTP is much more accurate than doing it by hand.

But to preserve your changes, the system clock needs to be written to the RTC (battery-powered hardware clock) at some point.

If you keep the NTP daemon running, the RTC will automatically get updated every 11 minutes. (Always true with ntpd or systemd-timesyncd, but needs the 'rtctrim' option with chrony.) For portable systems I would recommend enabling systemd-timesyncd.service to handle clock sync.

If you do not want to run NTP permanently, then you'll need to run hwclock --systohc to save the system clock in RTC, every time the system clock is adjusted.

0

Thank you for answer, user1686. You gave me good hint.

I solved the problem. What I did:

$ sudo ntpd -qg
$ GRUB_CMDLINE_LINUX_DEFAULT="clocksource=hpet"
$ su
# grub-mkconfig -o /boot/grub/grub.cfg
# reboot

Hope, that this help for somebody. Thanks for help.

UPD: This solution doesn't works.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .