1

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

2

Use the following syntax to set new data and time:

date --set="STRING"
| improve this answer | |
  • 1
    Also here's the formatting of the string inputted: date --set="30 APR 2011 18:46:00" – Ancide Apr 30 '11 at 16:42
1

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

| improve this answer | |
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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy