1

As the title says, my system clock is not synchronized. This is problematic since I need to update my software, and I continue to receive errors such as "Release file ... is not valid yet." I have tried multiple fixes throughout this website but none have resolved my issue. Does anyone have any other ideas?

Some additional information:

  • I am running Ubuntu 22.04 LTS (no Windows in dualboot).

  • When I run sudo systemctl restart systemd-timesyncd,I get Failed to restart systemd-timesyncd.service: Unit systemd-timesyncd.service is masked.

  • When I run timedatectl, I get

            Local time: Wed 2022-06-08 03:33:34 CDT
        Universal time: Wed 2022-06-08 08:33:34 UTC
              RTC time: Wed 2022-06-08 08:33:34
             Time zone: America/Chicago (CDT, -0500)
    

    System clock synchronized: no

           NTP service: n/a
       RTC in local TZ: no
    
  • Also, because I tried some of those previous solutions, I lost the ability to automatically set date and time, as suggested by the first answer to this post.

Settings's GUI:

enter image description here

UPDATES (thanks to user68186)

  1. I have the following in my /etc/systemd/timesyncd.conf file:
[Time] 
NTP=ntp.ubuntu.com 
FallbackNTP=pool.ntp.org       
#RootDistanceMaxSec=5 
#PollIntervalMinSec=32 
#PollIntervalMaxSec=2048
  1. MY NTP service is now active again, and the "Automatic Date & Time" switch is once again available in my Settings GUI. This progress was made by referencing this post, since NTP was not supported on my device.

  2. I still am not having my time synchronized on my device.

  3. Ran the following commands, which did not return errors!

sudo systemctl enable systemd-timesyncd.service

sudo systemctl start systemd-timesyncd.service

user68186
  • 37,461

1 Answers1

0

Command line steps

First, unmask the service by:

sudo systemctl unmask systemd-timesyncd

Then install the service again

sudo apt install systemd-timesyncd

Activate NTP:

sudo timedatectl set-ntp true

At this point your NTP service should be active again, and the "Automatic Date & Time" switch is once again available in your Settings GUI.

If that does not help, try these two commands again:

sudo systemctl enable systemd-timesyncd.service
sudo systemctl start systemd-timesyncd.service

I checked two of my computers both has the following lines in their /etc/systemd/timesyncd.conf:

[Time]
#NTP=
#FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

Edit the [Time] section of the file /etc/systemd/timesyncd.conf and make the first two lines look like this:

[Time] 
NTP=ntp.ubuntu.com 
FallbackNTP=pool.ntp.org 

Reboot the computer to make sure the services are initialized at boot time:

sudo reboot

After rebooot, check again: From the man timesyncd.conf command:

The default configuration is defined during compilation, so a configuration file is only needed when it is necessary to deviate from those defaults. By default, the configuration file in /etc/systemd/ contains commented out entries showing the defaults as a guide to the administrator. This file can be edited to create local overrides.

So, it seems editing this file may not be needed.

timedatectl status

Hope this helps

user68186
  • 37,461