Clock on wrong time
My clock is showing the wrong time. How can I get it back to the right time?
|
use date
to set the time use the following comand:
Code:
date MMDDhhmm DD: Day - 07 hh: the current hour in 24 hour time mm: the current minute use 2 digits, like 09 so for me i would type: Code:
date 08072050 |
nope... al it does is print:
Thu Aug 8 12:06:32 2002 -0.6 blahblah seconds Thats not the correct time... GRRRRR! |
You have to use the -s argument to set the time. Try man date to see the full usage of date. Also, you must have root level privileges.
scott@linuxbox:~> date Thu Aug 8 17:34:49 CDT 2002 scott@linuxbox:~> date -s 19:04 date: cannot set date: Operation not permitted Thu Aug 8 19:04:00 CDT 2002 scott@linuxbox:~> date Thu Aug 8 17:34:59 CDT 2002 <-- Notice it didn't change scott@linuxbox:~> su root Password: scott@linuxbox:/home/scott# date -s 19:05 Thu Aug 8 19:05:00 CDT 2002 scott@linuxbox:/home/scott# exit scott@linuxbox:~> date Thu Aug 8 19:05:12 CDT 2002 |
You can look into 'ntpdate' to sync your date/time with a time server.
Code:
# ntpdate tick.usno.navy.mil |
All times are GMT -5. The time now is 12:00 AM. |