LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 07:08 PM   #1
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
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, 08:19 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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-07-2005, 11:11 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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, 07:50 AM   #4
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
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, 08:01 AM   #5
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Original Poster
Rep: Reputation: 36
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, 10:53 AM   #6
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
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, 02:19 PM   #7
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Original Poster
Rep: Reputation: 36
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



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 12:50 PM
setting the clock in slack 10 buffed317 Slackware 10 02-17-2005 11:59 AM
setting the hardware clock.. kurrupt Linux - Hardware 1 08-25-2004 11:00 PM
Setting Clock ArthurDent Linux - Newbie 2 03-27-2004 07:09 AM
Setting System clock linuxBill Linux - General 3 08-05-2003 08:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:22 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