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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
02-17-2004, 08:28 PM
|
#1
|
Member
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331
Rep:
|
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.
|
|
|
02-17-2004, 08:34 PM
|
#2
|
LQ Newbie
Registered: Feb 2004
Posts: 21
Rep:
|
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.
|
|
|
02-17-2004, 08:48 PM
|
#3
|
Moderator
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
|
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...
|
|
|
02-17-2004, 10:52 PM
|
#4
|
Member
Registered: Apr 2003
Location: Dallas, TX
Posts: 122
Rep:
|
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
|
|
|
02-18-2004, 09:41 AM
|
#5
|
Member
Registered: Jan 2004
Location: Munich
Distribution: SuSE 9.2, 10.2, 10.3, knoppix
Posts: 276
Rep:
|
At the console, enter
hwclock --set --date 'dd/mm/yyyy hh:mm:ss'
hwclock --hctosys
HTH
|
|
|
02-18-2004, 09:56 AM
|
#6
|
Member
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464
Rep:
|
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.
|
|
|
02-18-2004, 12:24 PM
|
#7
|
Member
Registered: Jul 2001
Distribution: Slackware 12
Posts: 511
Rep:
|
This is what I use:
netdate time.nist.gov
I have it set to run every hour so my clock is always on time.
|
|
|
02-18-2004, 01:07 PM
|
#8
|
Member
Registered: Nov 2003
Distribution: Fedora Core3, RHEL3,4
Posts: 92
Rep:
|
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
|
|
|
02-18-2004, 09:15 PM
|
#9
|
Member
Registered: Sep 2003
Location: Iceland
Distribution: Debian Lenny - Kernel 2.6.22.8
Posts: 331
Original Poster
Rep:
|
Thanks for the quick replies all. Once again my clock is on time. Whee.
|
|
|
All times are GMT -5. The time now is 10:21 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|