Setting the system date and clock

To set the system clock, use the date command.

For Redhat Systems, use the following format:

date --set="Mmm DD HH:MM:SS YYYY"

Example:

date --set="Oct 20 15:52:29 2004"

For FreeBSD systems, use the following format:

date YYMMDDHHMM

Example:

date 0410201544

Will set the date/time to 2004, October 20th, 15:44 (3:44pm).

For any operating system, if you have the rdate program, you can simply type:

rdate -s time.nrc.ca

to sync your server with the atomic clock in Boulder, Colorado. Note that if the value set by rdate isn't correct, then you likely have a wrong timezone specified. Commands like system-config-date or redhat-config-date can set it up for you.

  • 105 Users Found This Useful
Was this answer helpful?

Related Articles

Do I need a Dedicated Server?

Having a dedicated server gives you high flexibility and a lot of options for your site. You...

Who does manage my Dedicated Server?

All our Dedicated plans come completely unmanaged unless you buy a managed service addon. What it...

Do you help to setup control panels and operating systems?

All dedicated servers come with the operating system of customer choice preinstalled. All...

How to use SSH

SSH is a tool used to connect to your server. This is how 95% of your system is setup. To use...

Which OS am I using?

During support requests, we will often ask a client which OS version they're using. Running all...