Sunday, May 12, 2024
 Popular · Latest · Hot · Upcoming
34
rated 0 times [  34] [ 0]  / answers: 1 / hits: 4501  / 2 Years ago, mon, may 2, 2022, 4:08:53

The BBC reports:




An extra second will be added to the world's clocks on New Year's Eve
in order to stay in sync with the Earth's rotation.




Does this mean that I have to do anything so that my Ubuntu machine keeps in time with this or will it automatically adjust itself to not be a second off?


More From » time

 Answers
7

If your Ubuntu machine listens to NTP and synchronizes time with the Internet, the system will automatically adjust itself for the difference in time.



While your computer might not necessarily be aware of the fact that a leap second happened, it will catch and record the event as NTP servers push the change throughout the internet.



If you don't feel like the extra second is being added, you can force an update using the following command:



sudo ntpdate -s pool.ntp.org


This will automatically perform geo-location to give you a nearby server (reducing the latency error) and Ubuntu will adjust for your timezone (so if the server is in a different timezone, it's still all okay). Alternatively, you can use ntp.ubuntu.com.



Note that if you're very unlucky, none of the time servers you're using will handle the leap second correctly. It's unlikely, but possible. Checking manually against a known good source (analogue radio, possibly time.is) is advised.






Alternatively, if you're on a modern version of Ubuntu, there's a built in utility called timedatectl. By default, this runs once automatically on startup. Therefore, a quick reboot can force a sync if necessary.


[#12619] Wednesday, May 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oileweaty

Total Points: 337
Total Questions: 108
Total Answers: 105

Location: Western Sahara
Member since Mon, May 3, 2021
3 Years ago
;