As the article topic suggests, after going through it you will be able to set/sync internet time on your Debian based Linux distro. This includes all Ubuntu based and other. To setup internet time we will use a small package that is officially available on Debian stable repository. The package name is rdate.
What is rdate?
rdate is a simple command line tool for Linux that is similar to ntp (package). rdate is a utility tool to sync internet time with your machine. You get a variety of options to sync time through it. You will need to define a time server to sync or print current local time.Enough about rdate now lets see how you can sync internet time with one command. But sure only after installing it, its a single command far to sync time. And installation is child's play/easy as pie.
Although rdate comes with pre-installed on most distro, lets see how you install it on a Debian machine.
Make sure your OS is uptodate, open terminal and do as below,
sudo apt install rdateNow that the installation is finished lets set the time.
Sync Internet Time With One Command
If you are eager to set time,
sudo rdate -n -s time.nist.govThis command will set your time form the given server and of course you can use other time servers, you can find other down below. Ain't this easy?? Easy and simplier than ntp.
To print the time (no setting),
rdate -n -p time.nist.gov #to print the time on your teminal, just to seeYou can use the below time servers incase one is down or you just dont wanna use one.
time.nist.gov time.windows.com time.google.com

On some servers you might need to use -n option to use SNTP protocol. Like (sudo rdate -n -s time.windows.com)
And that's all folks, hope you enjoyed syncing your time...:) Have a good day and keep coming.