How to change server date via ssh shell?

Posted on the August 27th, 2008 under Server Admin Tips by Stephen

It is pretty easy to change your server date and time via shell.

 

 

  1. First, execute “date” to see the current date and time:
    root@myserver [~]# date
    Wed Aug 27 21:03:57 CDT 2008

     

  2. Now, execute in this format to set the new date and time:
    root@myserver [~]# date --set='Wed Aug 27 22:00:00 CDT 2008'

     

  3. Now, execute “date” again to see if the changes get applied:
    root@myserver [~]# date
    Wed Aug 27 22:00:00 CDT 2008

Done! :)


Share this page:
  • Facebook
  • Twitter
  • StumbleUpon
  • Slashdot
  • Digg
  • del.icio.us
  • Google Bookmarks
  • Live
  • MySpace
  • Technorati
  • LinkedIn
  • Reddit
Related Posts:
  1. How to change server main or primary IP address?

3 Responses to 'How to change server date via ssh shell?'

  1. February 5, 2010 at 11:54 am
    earl b
  2. February 5, 2010 at 11:58 am
    earl b
  3. February 5, 2010 at 12:31 pm
    Stephen

Leave a Comment