Update Time on Linux Server

We get this question a lot.

How do I update the time on my Collocated server?

Simple,

rdate [-p] [-s] [-u] [-l] [host…]

rdate connects to an RFC 868 time server over a TCP/IP network, printing the returned time and/or sets the system clock. OPTIONS

-p
Print time returned by the remote machine.
-s
Set system time to the returned time.
-u
Use UDP instead of TCP as the transport.
-l
Use syslog to output errors (cron.warning) and output (cron.info).

We will use this to set the time.

rdate -s time.nist.gov

There are other servers/hosts that you can retrieve the time from. This is the one we use on the east coast.

or you can use UCLA's

or maybe… (times out for me)