I need to set my clock within 1 second of "real" time as posted on time.is and similar sources. This is required by my digital radio application. The built-in NTP synchronization (Pi 3A+ with current OS) will usually provide this but not always. So when it doesn't, I would like to manually set the time rather than using an RTC or GPS.
Will the following steps work without causing problems or is there a better way?
1. It appears necessary to first stop the synchronization that normally occurs. A suitable command for doing this appears to be:
sudo systemctl disable systemd-timesyncd.service
then reboot
2. Can the time then be set using any of the following commands?
sudo date -s 2014-12-25 12:34:56
sudo timedatectl set-time 2020-10-02 21:59:33
sudo timedatectl set-time '12:00:00'
Please advise whether there are any syntax errors in the above commands.
3. Hopefully the clock will maintain the necessary accuracy over a relatively short period - say 1 hour. After that I would want to return the clock to its original state. Will the following command achieve this?
sudo systemctl enable systemd-timesyncd.service
then reboot
Thanks for your help!