LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-07-2005, 08:08 PM   #1
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Rep: Reputation: 35
setting the clock


how do i set the clock on my slackware 9.1 system as it is wrong. and all teh install offered me was is this A correct or B utc, diddnt offer, C plain wrong!

what is the comeand to do this? and do i need to be root to do this?
 
Old 10-07-2005, 09:19 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Yes, you need to be root, the command is:

date -s <date string>

e.g.

date -s "Fri Oct 7 21:19:13"
 
Old 10-08-2005, 12:11 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
There are two commands that must be used in the correct order to get it to work properly: date and hwclock.

I don't remember the order, nor the options.

Google on those two keywords: date hwclock. You should easily turn up a document relative how to used them in the correct order, and which options to use.

I did it a couple of months back. Thought I'd saved a copy of the instructions, but I can't find them.
 
Old 10-08-2005, 08:50 AM   #4
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 418

Rep: Reputation: 89
Re: setting the clock

Quote:
Originally posted by dasy2k1
how do i set the clock on my slackware 9.1 system as it is wrong. and all teh install offered me was is this A correct or B utc, diddnt offer, C plain wrong!

what is the comeand to do this? and do i need to be root to do this?
Firstly, see if "/etc/localtime" is linked to the right timezone for you.
If yes then you see if "hwclock" has the right setting
see if "/etc/hardwareclock" has "UTC" or "localtime" and change accordingly to what you want.

then run date and set the right hour.

You can change all this interactively without messing with all these files i mentioned by running "timeconfig" as root and it will
ask you the same questions as the installation did.
This way you can set it in 2 seconds but i mentioned the manual way too just for the sake of knowledge.
 
Old 10-08-2005, 09:01 AM   #5
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Original Poster
Rep: Reputation: 35
Thumbs up

thanks for that, both my hardware clock and system clock are now coirrect though not exactly teh same as each other

but is will do.
 
Old 10-08-2005, 11:53 AM   #6
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,178

Rep: Reputation: 47
One thing that's often overlooked is the hwclock parameters. After setting the time with date you can use hwclock --systohc to set the new system time to the hardware clock so they are both the same.
 
Old 10-08-2005, 03:19 PM   #7
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 958

Original Poster
Rep: Reputation: 35
well it synced on systrem halt though with otehr problems to the system i am reinstalling (see post about grub error 17 in newbie forum)
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SUSE 9.3 clock setting ionmich SUSE / openSUSE 1 10-17-2005 01:50 PM
setting the clock in slack 10 buffed317 Slackware 10 02-17-2005 12:59 PM
setting the hardware clock.. kurrupt Linux - Hardware 1 08-26-2004 12:00 AM
Setting Clock ArthurDent Linux - Newbie 2 03-27-2004 08:09 AM
Setting System clock linuxBill Linux - General 3 08-05-2003 09:07 AM


All times are GMT -5. The time now is 02:42 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration