How to change server date via ssh shell?

by Stephen on August 27, 2008

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! :)

{ 4 comments… read them below or add one }

earl b February 5, 2010 at 11:54 am

the name of my server is WINDSTREAM. it is misspelled WINDSTREM. when i try to send an e or g mail. a popup said the server could not be found

Reply

earl b February 5, 2010 at 11:58 am

please help me find away to correct this problem

Reply

Stephen February 5, 2010 at 12:31 pm

Hi earl b,

What Operating System do you have and what control panel?

Reply

Saad January 26, 2012 at 11:24 pm

Thanks ! It worked perfectly !

Reply

Leave a Comment

Previous post:

Next post: