How to change Linux web server date through SSH?

link|improve this question
feedback

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

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

3 Answers

Use the following syntax to set new data and time:

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

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

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown