Archive

Posts Tagged ‘linux’

Setting Linux server time using command propt

March 15, 2010 Leave a comment

Setting Your System Time:
Today our web server was lagging for an hour. I need to change the timing. I got following link which was very useful.
http://www.troubleshooters.com/linux/settime.htm
I am copying part of it below:

* Pull up http://www.time.gov in a java enabled browser. The Java is necessary so that the website updates itself.
* Run the date command to set the date to the time on the browser:
date -s “11/29/2001 13:36:30”
to set the time to 13:36:30 on 11/29/2001. Obviously set the command to a slightly future time, wait for time.gov to catch up, then press the Enter key.
Note that at this point your system clock is accurate.
* Now it’s time to fix your hardware clock.
* Log in as root
* /sbin/hwclock -r
* /sbin/hwclock –adjust
* /sbin/hwclock –systohc
* Power down and power back up. Once again check your system time against time.gov. It should be good to within a few seconds, and stay that way for awhile (days or weeks).

If still server time is not changing then reboot the server and set the date in bios.

Categories: General Tags: