LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-04-2005, 04:59 PM   #1
lagartoflojo
Member
 
Registered: Sep 2004
Location: Santiago de Chile
Distribution: Slackware 10.2
Posts: 46

Rep: Reputation: 15
Time goes back 4 hours on every boot


Well, hello!

I have a problem: everytime I boot my PC, the time is set back 4 hours relative to the time that was set on the last boot. ie, if the clock says 14:00 now, and I reboot, the clock will say 10:00. This all started when I followed the instructions here to set my clock to the right time (it was 10 minutes slow before, but at least none of this magic time-changing happened). So what I want to know is how to fix this so the clock will be normal again.
Here's some output that might be useful...
Code:
hernan@hernan:~ (23.740 MB)$ date
Sat Apr  2 01:55:59 CLT 2005
hernan@hernan:~ (23.740 MB)$ /sbin/hwclock
Sat 02 Apr 2005 05:56:11 AM CLT  -0.178997 seconds
(as you can see, the kernel clock and the hw clock differ).
It probably has something to do with my timezone (CLT: -4 hrs) but I have no idea on how to go about fixing this.
The basic instructions I followed to set the clock were:
Quote:
Summary

* /etc/sysconfig/clock sets whether the hardware clock is stored as UTC or local time.

* Symlink /etc/localtime to /usr/share/zoneinfo/... to set your timezone.

* Run ``date MMDDhhmm'' to set the current system date/time.

* Type ``/sbin/hwclock --systohc [--utc]'' to set the hardware clock.
Thanks for your help,
-- L*F
 
Old 04-04-2005, 05:18 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I have too a delay between hardware clock and system time
Code:
$ date
Tue Apr  5 00:12:00 CEST 2005
$ /sbin/hwclock
Tue Apr  5 00:12:30 2005  -0.809428 seconds
Slackware provides a tool to set zone time, as root try:
Code:
# timeconfig
And you could set your machine time with a time server
Code:
# ntpdate cl.pool.ntp.org
I used here a time server in Chili, look at this list :
http://ntp.isc.org/bin/view/Servers/NTPPoolServers
 
Old 04-04-2005, 05:37 PM   #3
lagartoflojo
Member
 
Registered: Sep 2004
Location: Santiago de Chile
Distribution: Slackware 10.2
Posts: 46

Original Poster
Rep: Reputation: 15
Thanks! I hope the changes live a reboot =D

-- L*F
 
Old 04-04-2005, 05:38 PM   #4
dhave
Member
 
Registered: Oct 2004
Location: still outside the Matrix
Distribution: Arch, formerly Gentoo and Slackware
Posts: 438

Rep: Reputation: 31
Re: Time goes back 4 hours on every boot

Quote:
Originally posted by lagartoflojo
I have a problem: everytime I boot my PC, the time is set back 4 hours relative to the time that was set on the last boot. ie, if the clock says 14:00 now, and I reboot, the clock will say 10:00.
If this were a Windows box, I'd suggest just rebooting six times. ;-]

(Sorry. I couldn't resist.)

Last edited by dhave; 04-04-2005 at 05:41 PM.
 
Old 04-04-2005, 05:43 PM   #5
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You could put ' ntpdate cl.pool.ntp.org ' in /etc/rc.d/rc.local
To be more accurate, better is to put it in a crontab, though
 
Old 04-04-2005, 06:04 PM   #6
lagartoflojo
Member
 
Registered: Sep 2004
Location: Santiago de Chile
Distribution: Slackware 10.2
Posts: 46

Original Poster
Rep: Reputation: 15
Re: Re: Time goes back 4 hours on every boot

Quote:
Originally posted by clawhead
If this were a Windows box, I'd suggest just rebooting six times. ;-]

(Sorry. I couldn't resist.)
haha... mmk.

--L*F
 
Old 04-04-2005, 06:04 PM   #7
lagartoflojo
Member
 
Registered: Sep 2004
Location: Santiago de Chile
Distribution: Slackware 10.2
Posts: 46

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by keefaz
You could put ' ntpdate cl.pool.ntp.org ' in /etc/rc.d/rc.local
To be more accurate, better is to put it in a crontab, though
I'll have to read up on this crontab stuff.. thanks =D

-- L*F
 
Old 04-04-2005, 07:50 PM   #8
slackwarefan
Member
 
Registered: Oct 2003
Location: Florida
Distribution: Slackware
Posts: 273

Rep: Reputation: 30
I had this problem before. It was because I had set my clock to utc but told it local, or the other way around. There's a shutdown script you can modify. I'll try to find it. or you can grep for hwclock in your shutdown scripts.
 
Old 04-06-2005, 08:28 AM   #9
lagartoflojo
Member
 
Registered: Sep 2004
Location: Santiago de Chile
Distribution: Slackware 10.2
Posts: 46

Original Poster
Rep: Reputation: 15
using "timeconfig" and getting the right time from an ntp server, then doing "/sbin/hwclock --systohc" solved the problem. thanks =D

-- L*F
 
  


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
Back in Time? mykrob Linux - General 6 07-28-2004 01:17 PM
Time setting back 5 hours dsheller Linux - Newbie 4 01-24-2004 10:33 PM
Time stamp in Samba is 11 hours behind time stamp in Linux Linh Linux - General 3 09-04-2003 12:44 PM
After restart time jumps 7 hours mlbaker Linux - General 4 03-22-2003 11:19 AM
xscreensaver sets system clock back four hours the theorist Linux - General 0 04-23-2002 12:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:14 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
Open Source Consulting | Domain Registration