How to Change Server Date?

1

How do I change a Linux web server's date through SSH?

Joshua

Posted 2011-04-30T16:36:23.747

Reputation:

Answers

2

Use the following syntax to set new data and time:

date --set="STRING"

Harry Joy

Posted 2011-04-30T16:36:23.747

Reputation: 157

1Also here's the formatting of the string inputted: date --set="30 APR 2011 18:46:00" – None – 2011-04-30T16:42:49.233

1

With the date command. See man date for more information.

regularfry

Posted 2011-04-30T16:36:23.747

Reputation: 121

1

Another option is to use the ntpdate command to sync it from a public NTP server, then start up ntpd to keep it in sync.

Xenoactive

Posted 2011-04-30T16:36:23.747

Reputation: 992