LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 08-07-2002, 10:48 PM   #1
bripage
Member
 
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, 10:54 PM   #2
BinaryBob
Member
 
Registered: Aug 2002
Posts: 117

Rep: Reputation: 15
use date

to set the time use the following comand:

Code:
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:

Code:
date 08072050
hope that helps
 
Old 08-07-2002, 11:04 PM   #3
bripage
Member
 
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, 05:38 PM   #4
jeepix
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
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

Last edited by jeepix; 08-08-2002 at 05:42 PM.
 
Old 08-08-2002, 08:45 PM   #5
crabboy
Moderator
 
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.
Code:
# ntpdate tick.usno.navy.mil
 8 Aug 21:43:19 ntpdate[25341]: adjust time server 192.5.41.40 offset 0.000404 sec
 
  


Reply


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 07:19 PM
Various clock issues: Clock shows wrong time only in Knoppmyth, & CMOS time change ? davidbix General 1 04-05-2006 09:58 PM
System clock always wrong Brain Drop Fedora 1 09-09-2004 12:18 AM
Fedora Core 1 Clock shows the wrong time. mwolff Linux - Newbie 6 04-01-2004 02:03 PM
system clock wrong!!! need help pockyboy Linux - General 3 07-03-2002 06:32 PM


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

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