View previous topic :: View next topic |
Author |
Message |
kahlil88 n00b
Joined: 01 Mar 2009 Posts: 42 Location: Mendocino, CA
|
Posted: Sat Mar 14, 2009 9:39 am Post subject: System clock always wrong |
|
|
My system clock is always off by a few hours. I managed to set it with ntpdate once, but after rebooting it's wrong again. My CMOS battery works fine and the time is correct in Windows. _________________ There is no system but GNU and Linux is one of its kernels.
Join the FSF as an Associate Member! |
|
Back to top |
|
|
smerf l33t
Joined: 06 Nov 2004 Posts: 778 Location: Polska
|
Posted: Sat Mar 14, 2009 12:47 pm Post subject: |
|
|
It is precisely N hours where N is integer? Do you have right time zone selected?
What do you get after egrep ^TIMEZONE=\|^CLOCK= /etc/conf.d/clock? _________________ Microsoft is not the answer, Microsoft is the question, the answer is no. |
|
Back to top |
|
|
Leon_UK Tux's lil' helper
Joined: 06 Dec 2006 Posts: 128 Location: London
|
Posted: Sat Mar 14, 2009 12:48 pm Post subject: |
|
|
If I recall correctly I don't remember if it was in the handbook or a comment in the "/etc/conf.d/clock" it used to say if you dual boot with windows you should set that file to local or you will keep getting an incorrect time.
Code: | nano -w /etc/conf.d/clock |
if you do not have that file it should be
Code: | nano -w /etc/conf.d/hwclock |
mine looks like this
Code: | $ cat /etc/conf.d/hwclock
CLOCK="UTC"
TIMEZONE="Europe/London" |
Though if you dual boot with windows UTC should be changed to local
Code: | $ cat /etc/conf.d/hwclock
CLOCK="local"
TIMEZONE="Europe/London" |
The timezone setting is one other possibility as to what could be causing an incorrect clock, your original setting could have been overwritten in an update or something, to be sure it is not the cause, you could copy that over again.
find your timezone if you do not know it with
Code: | ls /usr/share/zoneinfo
|
then (using my timezone as the example)
Code: | cp /usr/share/zoneinfo/Europe/London /etc/localtime |
and make sure that is set in /etc/conf.d/clock (or "hwclock" depending on which you have) as mine is above with TIMEZONE=
hopefully this would solve your problem. _________________ AMD 7750 BE (@3.0ghz) || pci-e 7600GT (@650/800)Nvidia-drivers || 4gb ddr2 || ~amd64(funtoo) ||gentoo-sources-2.6.35-r1 |
|
Back to top |
|
|
kahlil88 n00b
Joined: 01 Mar 2009 Posts: 42 Location: Mendocino, CA
|
Posted: Sun Mar 15, 2009 9:29 pm Post subject: |
|
|
It worked! Thanks for your help. _________________ There is no system but GNU and Linux is one of its kernels.
Join the FSF as an Associate Member! |
|
Back to top |
|
|
jsowoc n00b
Joined: 29 May 2005 Posts: 22 Location: Calgary, AB, Canada
|
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54827 Location: 56N 3W
|
Posted: Fri Apr 03, 2009 7:52 pm Post subject: |
|
|
jsowoc,
The handbook is written around baselayout1 as that is what stable gentoo provides.
With baselayout2, the setup changes and there is a migration guide to ensure an smooth transition. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
muhsinzubeir l33t
Joined: 29 Sep 2007 Posts: 948 Location: /home/muhsin
|
Posted: Sat Apr 04, 2009 10:39 am Post subject: |
|
|
clock in my box was also not working...didnt know why though, as the /etc/conf.d/clock was correct.I removed it and use /etc/conf.d/hwclock and clock working correct.
But I still have that warning Factory settings of the clock as no /etc/conf.d/clock in there...if use this file I get 2hrs ahead of my time regardless of the settings in there.
Where can I tell the system to check /etc/conf.d/hwclock instead?
P:S
baselayout-->sys-apps/baselayout: 1.12.11.1 _________________ ~x86
p5k-se
Intel Core 2 Duo
Nvidia GT200
http://www.zanbytes.com |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54827 Location: 56N 3W
|
Posted: Sat Apr 04, 2009 11:30 am Post subject: |
|
|
muhsinzubeir,
There are two scenarios.
1. You dual boot with windows.
In your BIOS, set the time by your wristwatch.
copy /usr/share/zoneinfo/localtime to /etc/localtime
In your /etc/conf.d/clock set your timezone to localtime
You must boot into Windows to get changes in daylight saving time to take effect because windows changes your BIOS time.
2. You use Linux Only
In your BIOS, set the time to UTC
copy /usr/share/zoneinfo/<city_near_you> to /etc/localtime
In your /etc/conf.d/clock set your timezone to <city_near_you>
Daylight savings time changes happen in real time. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
justinkb Apprentice
Joined: 23 Dec 2008 Posts: 161
|
Posted: Sat Apr 04, 2009 11:43 am Post subject: |
|
|
thanks for clearing that up neddy, i ended up changing the clock for DST in the bios, which gives the same effect as you say. |
|
Back to top |
|
|
muhsinzubeir l33t
Joined: 29 Sep 2007 Posts: 948 Location: /home/muhsin
|
Posted: Sat Apr 04, 2009 1:13 pm Post subject: |
|
|
Thanks Neddy....got it now...issue was in the Bios, i noticed that 3 of my boxes were set utc+2....but I couldnt fix one of them, I cant access the Bios...so I settup ntp-client en I think I can live for a while...
Cheers _________________ ~x86
p5k-se
Intel Core 2 Duo
Nvidia GT200
http://www.zanbytes.com |
|
Back to top |
|
|
alatar n00b
Joined: 12 Feb 2009 Posts: 61
|
Posted: Sun Apr 05, 2009 5:29 am Post subject: |
|
|
NeddySeagoon wrote: | muhsinzubeir,
There are two scenarios.
1. You dual boot with windows.
In your BIOS, set the time by your wristwatch.
......
2. You use Linux Only
In your BIOS, set the time to UTC
....... |
What will happen if I set the time to UTC in the first scenario? I am asking because a had done that and my Gentoo works fine. But maybe I am missing something? |
|
Back to top |
|
|
justinkb Apprentice
Joined: 23 Dec 2008 Posts: 161
|
Posted: Sun Apr 05, 2009 6:16 am Post subject: |
|
|
your time will be fudged up in windows if you do that. |
|
Back to top |
|
|
|