LinuxQuestions.org
Help answer threads with 0 replies.
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 02-17-2004, 08:28 PM   #1
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Rep: Reputation: 30
How do I adjust the clock?


Very noobish question but how do I adjust my clock? I searched these forums and found a post that pointed someone to use ntp, I then downloaded ntp but I don't have any time servers to synchronize with. Isn't there a way for me to manually edit the time? Like when you double click the clock in Windows you can adjust it.
Thanks.

Edit: By the way, (I don't know if this matters or not but...) I'm using Fluxbox on Debian.

Last edited by atheist; 02-17-2004 at 08:29 PM.
 
Old 02-17-2004, 08:34 PM   #2
robster
LQ Newbie
 
Registered: Feb 2004
Posts: 21

Rep: Reputation: 15
I don't know if it's relevant, since you don't use mandrake... but I was having the smae problem with Gnome. it turns out on the desktop there was a control center sort of thing where I had to go, and it lets you change settings on your hardware and such.
 
Old 02-17-2004, 08:48 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: How do I adjust the clock?

Quote:
Originally posted by atheist
Very noobish question but how do I adjust my clock? I searched these forums and found a post that pointed someone to use ntp, I then downloaded ntp but I don't have any time servers to synchronize with. Isn't there a way for me to manually edit the time? Like when you double click the clock in Windows you can adjust it.
Thanks.

Edit: By the way, (I don't know if this matters or not but...) I'm using Fluxbox on Debian.
Well, Flux doesn't have a pointy-clicky thing
to achieve this ... but have a look at
man date
;)


Cheers,
Tink

P.S.: You can always point ntp at an open
server on the internet close to you...
 
Old 02-17-2004, 10:52 PM   #4
bruce1271
Member
 
Registered: Apr 2003
Location: Dallas, TX
Posts: 122

Rep: Reputation: 15
I wrote a cool little perl script that gets executed every 2 weeks and adjustes the linux and motherboard bios time to the Naval observatory:


[root@bruce ~]ssh:# more /etc/syncro_time.pl
#!/usr/bin/perl -w


##This program fetches the time from the USNO and sets my linux machine to it.
##################################################################
@q = `lynx "http://tycho.usno.navy.mil/cgi-bin/timer.pl" -dump `;

$time = $q[4];

$time =~ s/\,//g;
$time =~ s/\.//g;
$time =~ s/Eastern daylight time//i;
$time =~ s/Eastern standard time//i;
$time =~ s/ A//i;
print $time;

#Set the time in Linux
`date -s \"$time\"`;
#Set the time in MB BIOS
`hwclock --systohc`;


Bruce
 
Old 02-18-2004, 09:41 AM   #5
Marius2
Member
 
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276

Rep: Reputation: 31
At the console, enter

hwclock --set --date 'dd/mm/yyyy hh:mm:ss'
hwclock --hctosys


HTH
 
Old 02-18-2004, 09:56 AM   #6
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
Use ntp, as suggested. It works well. There are many public timeservers you can use. You don't need level 1 servers (and should not use them unless you yourself are serving time to a large group of workstattions, but many level 2 servers are meant to be used by the public in general (ah, the old spirit of the internet). See http://www.eecis.udel.edu/~mills/ntp/servers.html for the "Rules of Engagement" with the links to currently available (public) servers at the bottom of the page.
 
Old 02-18-2004, 12:24 PM   #7
Wynd
Member
 
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511

Rep: Reputation: 32
This is what I use:

netdate time.nist.gov

I have it set to run every hour so my clock is always on time.
 
Old 02-18-2004, 01:07 PM   #8
brentos
Member
 
Registered: Nov 2003
Distribution: Fedora Core3, RHEL3,4
Posts: 92

Rep: Reputation: 15
This is a little unrealted but in RedHat 9 doesen't the boot up sync the clock with the redhat time server? I think I have seen this go by during boot up but I never really pay attention unless I see a fail.

And besides I am not really concerned if my time is a little bit of, as long as it is consistantly off so it does not mess up my logs
 
Old 02-18-2004, 09:15 PM   #9
atheist
Member
 
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331

Original Poster
Rep: Reputation: 30
Thanks for the quick replies all. Once again my clock is on time. Whee.
 
  


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,hardware clock varunbihani Linux - Newbie 2 07-23-2005 09:04 AM
Dot Clock / Pixel Clock Freaksta Linux - Hardware 1 05-05-2004 08:21 PM
system clock vs. CMOS clock dtamajka Linux - General 7 12-11-2003 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:21 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration