Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

migrated from stackoverflow.com Apr 30 '11 at 16:52

This question came from our site for professional and enthusiast programmers.

Use the following syntax to set new data and time:

date --set="STRING"
share|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

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

share|improve this answer

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.

share|improve this answer

You must log in to answer this question.