Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 08-07-2002, 11:48 PM   #1
Registered: Jan 2002
Location: Moorpark
Distribution: SLACK 8!
Posts: 230

Rep: Reputation: 30
Clock on wrong time

My clock is showing the wrong time. How can I get it back to the right time?
Old 08-07-2002, 11:54 PM   #2
Registered: Aug 2002
Posts: 117

Rep: Reputation: 15
use date

to set the time use the following comand:

date MMDDhhmm
MM: Month - 08
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:

date 08072050
hope that helps
Old 08-08-2002, 12:04 AM   #3
Registered: Jan 2002
Location: Moorpark
Distribution: SLACK 8!
Posts: 230

Original Poster
Rep: Reputation: 30
nope... al it does is print:

Thu Aug 8 12:06:32 2002 -0.6 blahblah seconds

Thats not the correct time... GRRRRR!
Old 08-08-2002, 06:38 PM   #4
LQ Newbie
Registered: Jul 2002
Location: Chicago, IL
Distribution: RedHat 7.3,7.2,6.2
Posts: 5

Rep: Reputation: 0
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
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

Last edited by jeepix; 08-08-2002 at 06:42 PM.
Old 08-08-2002, 09:45 PM   #5
Senior Member
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,823

Rep: Reputation: 120Reputation: 120
You can look into 'ntpdate' to sync your date/time with a time server.
# ntpdate
 8 Aug 21:43:19 ntpdate[25341]: adjust time server offset 0.000404 sec


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
System clock correct, hardware clock wrong karlovac Linux - General 5 01-16-2009 08:19 PM
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 10:58 PM
System clock always wrong Brain Drop Fedora 1 09-09-2004 01:18 AM
Fedora Core 1 Clock shows the wrong time. mwolff Linux - Newbie 6 04-01-2004 03:03 PM
system clock wrong!!! need help pockyboy Linux - General 3 07-03-2002 07:32 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration