* [gentoo-user] system clock keeps getting reset to weird times
@ 2005-11-18 18:30 Robert Persson
2005-11-18 18:41 ` Arturo 'Buanzo' Busleiman
2005-11-18 22:14 ` Benno Schulenberg
0 siblings, 2 replies; 13+ messages in thread
From: Robert Persson @ 2005-11-18 18:30 UTC (permalink / raw
To: gentoo-user
A week or two back I reset my system clock temporarily to 2001 in order to
install a package under wine with a time-limited installer, after which I set
it back again. Since then I have been getting really weird and annoying
clock behaviour.
For instance I sometimes find that the kde clock tells me that I am on UTC
rather than PST. At other times it tells me that I am on PST, but gives a
time exactly 8 hours in the future.
Now it is getting even weirder because I find that when I boot up and enter
kde, the clock shows a time approximately, but not exactly, 10 days in the
past. For instance the time now is 18 Nov 2005 10:03 am, but the clock
thinks it is 8 nov 2005 7:13 am. Yesterday at the same time it thought it
was 8 nov 7.xx pm.
Sometimes I am able to correct the time using the kde control panel.
Sometimes I am not and I have to use the other control panel I find in my K
menu (which I believe to be the Gnome one, but I'm not sure).
I have enabled ntpd in my default runlevel, and /etc/init.d/ntpd status
returns "started". However, when I select "Set date and time automatically"
in the kde control panel, I get the error "Unable to contact time server:
http://www.pool.ntp.org/zone/north-america", and I get the same error no
matter which server I select or type in. The (Gnome?) control panel does
allow me to select "Synchronize clock with internet servers", but when I do
so nothing happens, no matter how many servers I select.
How can I get ntpd and/or ntp-client working properly?
This is my current /etc/ntp.conf:
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 192.168.1.0 mask 255.255.255.0
fudge 127.127.1.0 stratum 3
driftfile /var/lib/ntp/ntp.drift
logfile /var/log/ntp.log
server time.nrc.ca
server ntp1.cmc.ec.gc.ca
server ntp2.cmc.ec.gc.ca
server clock.tricity.wsu.edu
server wuarchive.wustl.edu
server clock.psu.edu
server gilbreth.ecn.purdue.edu
server molecule.ecn.purdue.edu
server libra.rice.edu
server ntp.cox.smu.edu
and this is my /var/log/ntp.log:
13 Nov 15:38:34 ntpd[7996]: synchronized to LOCAL(0), stratum 5
13 Nov 15:53:30 ntpd[7996]: kernel time sync disabled 0041
13 Nov 15:54:34 ntpd[7996]: kernel time sync enabled 0001
14 Nov 05:44:27 ntpd[7996]: ntpd exiting on signal 15
7 Nov 05:47:11 ntpd[9980]: synchronized to LOCAL(0), stratum 5
7 Nov 05:47:11 ntpd[9980]: kernel time sync disabled 0041
7 Nov 05:48:17 ntpd[9980]: kernel time sync enabled 0001
7 Nov 05:56:50 ntpd[9980]: ntpd exiting on signal 15
7 Nov 05:59:57 ntpd[10925]: synchronized to LOCAL(0), stratum 5
7 Nov 05:59:57 ntpd[10925]: kernel time sync disabled 0041
7 Nov 06:01:01 ntpd[10925]: kernel time sync enabled 0001
7 Nov 06:16:23 ntpd[10925]: ntpd exiting on signal 15
14 Nov 20:29:38 ntpd[24699]: ntpd exiting on signal 15
16 Nov 21:45:26 ntpd[9972]: ntpd exiting on signal 15
16 Nov 21:45:26 ntpd[10536]: parent died before we finished, exiting
17 Nov 20:35:43 ntpd[9948]: ntpd exiting on signal 15
Note that there is no entry in the log for today (18 nov) even though I have
attempted today (18 nov according to both me and the computer) to disable and
reenable synchronisation through the (Gnome?) control panel.
Many thanks
Robert
--
Robert Persson
"Don't use nuclear weapons to troubleshoot faults."
(US Air Force Instruction 91-111, 1 Oct 1997)
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-18 18:30 [gentoo-user] system clock keeps getting reset to weird times Robert Persson
@ 2005-11-18 18:41 ` Arturo 'Buanzo' Busleiman
2005-11-18 22:14 ` Benno Schulenberg
1 sibling, 0 replies; 13+ messages in thread
From: Arturo 'Buanzo' Busleiman @ 2005-11-18 18:41 UTC (permalink / raw
To: gentoo-user
Another solution if you are having ntpd problems, is to use this command
from a crontab:
ntpdate -b time.nist.gov
stop ntpd before that
On Fri, 18 Nov 2005, Robert Persson wrote:
> A week or two back I reset my system clock temporarily to 2001 in order to
> install a package under wine with a time-limited installer, after which I set
> it back again. Since then I have been getting really weird and annoying
> clock behaviour.
>
> For instance I sometimes find that the kde clock tells me that I am on UTC
> rather than PST. At other times it tells me that I am on PST, but gives a
> time exactly 8 hours in the future.
>
> Now it is getting even weirder because I find that when I boot up and enter
> kde, the clock shows a time approximately, but not exactly, 10 days in the
> past. For instance the time now is 18 Nov 2005 10:03 am, but the clock
> thinks it is 8 nov 2005 7:13 am. Yesterday at the same time it thought it
> was 8 nov 7.xx pm.
>
> Sometimes I am able to correct the time using the kde control panel.
> Sometimes I am not and I have to use the other control panel I find in my K
> menu (which I believe to be the Gnome one, but I'm not sure).
>
> I have enabled ntpd in my default runlevel, and /etc/init.d/ntpd status
> returns "started". However, when I select "Set date and time automatically"
> in the kde control panel, I get the error "Unable to contact time server:
> http://www.pool.ntp.org/zone/north-america", and I get the same error no
> matter which server I select or type in. The (Gnome?) control panel does
> allow me to select "Synchronize clock with internet servers", but when I do
> so nothing happens, no matter how many servers I select.
>
> How can I get ntpd and/or ntp-client working properly?
>
> This is my current /etc/ntp.conf:
>
> restrict default noquery notrust nomodify
> restrict 127.0.0.1
> restrict 192.168.1.0 mask 255.255.255.0
> fudge 127.127.1.0 stratum 3
> driftfile /var/lib/ntp/ntp.drift
> logfile /var/log/ntp.log
> server time.nrc.ca
> server ntp1.cmc.ec.gc.ca
> server ntp2.cmc.ec.gc.ca
> server clock.tricity.wsu.edu
> server wuarchive.wustl.edu
> server clock.psu.edu
> server gilbreth.ecn.purdue.edu
> server molecule.ecn.purdue.edu
> server libra.rice.edu
> server ntp.cox.smu.edu
>
> and this is my /var/log/ntp.log:
>
> 13 Nov 15:38:34 ntpd[7996]: synchronized to LOCAL(0), stratum 5
> 13 Nov 15:53:30 ntpd[7996]: kernel time sync disabled 0041
> 13 Nov 15:54:34 ntpd[7996]: kernel time sync enabled 0001
> 14 Nov 05:44:27 ntpd[7996]: ntpd exiting on signal 15
> 7 Nov 05:47:11 ntpd[9980]: synchronized to LOCAL(0), stratum 5
> 7 Nov 05:47:11 ntpd[9980]: kernel time sync disabled 0041
> 7 Nov 05:48:17 ntpd[9980]: kernel time sync enabled 0001
> 7 Nov 05:56:50 ntpd[9980]: ntpd exiting on signal 15
> 7 Nov 05:59:57 ntpd[10925]: synchronized to LOCAL(0), stratum 5
> 7 Nov 05:59:57 ntpd[10925]: kernel time sync disabled 0041
> 7 Nov 06:01:01 ntpd[10925]: kernel time sync enabled 0001
> 7 Nov 06:16:23 ntpd[10925]: ntpd exiting on signal 15
> 14 Nov 20:29:38 ntpd[24699]: ntpd exiting on signal 15
> 16 Nov 21:45:26 ntpd[9972]: ntpd exiting on signal 15
> 16 Nov 21:45:26 ntpd[10536]: parent died before we finished, exiting
> 17 Nov 20:35:43 ntpd[9948]: ntpd exiting on signal 15
>
> Note that there is no entry in the log for today (18 nov) even though I have
> attempted today (18 nov according to both me and the computer) to disable and
> reenable synchronisation through the (Gnome?) control panel.
>
> Many thanks
> Robert
> --
> Robert Persson
>
> "Don't use nuclear weapons to troubleshoot faults."
> (US Air Force Instruction 91-111, 1 Oct 1997)
>
> --
> gentoo-user@gentoo.org mailing list
>
>
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-18 18:30 [gentoo-user] system clock keeps getting reset to weird times Robert Persson
2005-11-18 18:41 ` Arturo 'Buanzo' Busleiman
@ 2005-11-18 22:14 ` Benno Schulenberg
2005-11-18 22:57 ` Richard Fish
` (2 more replies)
1 sibling, 3 replies; 13+ messages in thread
From: Benno Schulenberg @ 2005-11-18 22:14 UTC (permalink / raw
To: gentoo-user
Robert Persson wrote:
> For instance I sometimes find that the kde clock tells me that I
> am on UTC rather than PST. At other times it tells me that I am
> on PST, but gives a time exactly 8 hours in the future.
>
> Now it is getting even weirder because I find that when I boot up
> and enter kde, the clock shows a time approximately, but not
> exactly, 10 days in the past.
Your hardware clock is supposed to be at UTC?
Check with 'grep CLOCK= /etc/conf.d/clock'.
Your time zone is correctly set?
Check with 'ls -l /etc/localtime'.
If those are okay, do:
rm /etc/adjtime
hwclock --set --utc --date="2005-11-18 21:34" # example time
hwclock --hctosys
If your hardware clock must be at local time, then replace --utc
with --localtime.
Benno
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-18 22:14 ` Benno Schulenberg
@ 2005-11-18 22:57 ` Richard Fish
2005-11-19 0:39 ` John J. Foster
2005-11-21 9:03 ` Charles Trois
2005-11-22 4:25 ` Robert Persson
2 siblings, 1 reply; 13+ messages in thread
From: Richard Fish @ 2005-11-18 22:57 UTC (permalink / raw
To: gentoo-user
On 11/18/05, Benno Schulenberg <benno.schulenberg@gmail.com> wrote:
> Robert Persson wrote:
> > For instance I sometimes find that the kde clock tells me that I
> > am on UTC rather than PST. At other times it tells me that I am
> > on PST, but gives a time exactly 8 hours in the future.
> >
> > Now it is getting even weirder because I find that when I boot up
> > and enter kde, the clock shows a time approximately, but not
> > exactly, 10 days in the past.
>
> Your hardware clock is supposed to be at UTC?
> Check with 'grep CLOCK= /etc/conf.d/clock'.
>
> Your time zone is correctly set?
> Check with 'ls -l /etc/localtime'.
>
> If those are okay, do:
>
> rm /etc/adjtime
> hwclock --set --utc --date="2005-11-18 21:34" # example time
> hwclock --hctosys
>
> If your hardware clock must be at local time, then replace --utc
> with --localtime.
>
> Benno
> --
> gentoo-user@gentoo.org mailing list
>
>
Also, the KDE clock has a (IMO a very annoying) "feature" that will
change the timezone it displays in response to the scroll wheel. So
if it ever shows a different time than the "date" command, or jumps to
a different timezone, this may be the reason. You can configure the
timezones that can be displayed by right-clicking on the clock, Show
Timezone -> Configure Timezones.
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-18 22:14 ` Benno Schulenberg
2005-11-18 22:57 ` Richard Fish
@ 2005-11-21 9:03 ` Charles Trois
2005-11-21 11:36 ` Stephen Micheals
` (2 more replies)
2005-11-22 4:25 ` Robert Persson
2 siblings, 3 replies; 13+ messages in thread
From: Charles Trois @ 2005-11-21 9:03 UTC (permalink / raw
To: gentoo-user
Benno Schulenberg a écrit :
>
> Your hardware clock is supposed to be at UTC?
> Check with 'grep CLOCK= /etc/conf.d/clock'.
>
> Your time zone is correctly set?
> Check with 'ls -l /etc/localtime'.
>
> If those are okay, do:
>
> rm /etc/adjtime
> hwclock --set --utc --date="2005-11-18 21:34" # example time
> hwclock --hctosys
>
> If your hardware clock must be at local time, then replace --utc
> with --localtime.
>
I too have a clock problem (the time returned by "date" being one hour
fast), and I have been fiddling with "hwclock" without finding the right
way. When I saw the above post, I thought that it gave me the answer,
and tried to apply it, but had no success (I used both --utc and
--localtime).
The legal time, here in France and at this (winter) period, is GMT + 1,
as shown correctly by the clock of my iMac, but "date" keeps returning
GMT + 2.
Can anyone figure out the solution?
Charles
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-21 9:03 ` Charles Trois
@ 2005-11-21 11:36 ` Stephen Micheals
2005-11-21 14:55 ` Richard Fish
2005-11-21 21:56 ` Benno Schulenberg
2 siblings, 0 replies; 13+ messages in thread
From: Stephen Micheals @ 2005-11-21 11:36 UTC (permalink / raw
To: gentoo-user
i am having that same problem also.
On 11/21/05, Charles Trois <charles.trois@wanadoo.fr> wrote:
> Benno Schulenberg a écrit :
> I too have a clock problem (the time returned by "date" being one hour
> fast), and I have been fiddling with "hwclock" without finding the right
> way. When I saw the above post, I thought that it gave me the answer,
> and tried to apply it, but had no success (I used both --utc and
> --localtime).
>
> The legal time, here in France and at this (winter) period, is GMT + 1,
> as shown correctly by the clock of my iMac, but "date" keeps returning
> GMT + 2.
>
> Can anyone figure out the solution?
>
> Charles
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-21 9:03 ` Charles Trois
2005-11-21 11:36 ` Stephen Micheals
@ 2005-11-21 14:55 ` Richard Fish
2005-11-21 21:56 ` Benno Schulenberg
2 siblings, 0 replies; 13+ messages in thread
From: Richard Fish @ 2005-11-21 14:55 UTC (permalink / raw
To: gentoo-user
On 11/21/05, Charles Trois <charles.trois@wanadoo.fr> wrote:
> I too have a clock problem (the time returned by "date" being one hour
> fast), and I have been fiddling with "hwclock" without finding the right
> way. When I saw the above post, I thought that it gave me the answer,
> and tried to apply it, but had no success (I used both --utc and
> --localtime).
>
> The legal time, here in France and at this (winter) period, is GMT + 1,
> as shown correctly by the clock of my iMac, but "date" keeps returning
> GMT + 2.
Are you syncing time with an external time server? (run rc-update -s | grep ntp)
What timezone does /etc/localtime point to? (it should be a symbolic
link pointing to /usr/share/zoneinfo/Europe/Paris)
-Richard
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-21 9:03 ` Charles Trois
2005-11-21 11:36 ` Stephen Micheals
2005-11-21 14:55 ` Richard Fish
@ 2005-11-21 21:56 ` Benno Schulenberg
2005-11-23 18:11 ` Charles Trois
2 siblings, 1 reply; 13+ messages in thread
From: Benno Schulenberg @ 2005-11-21 21:56 UTC (permalink / raw
To: gentoo-user
Charles Trois wrote:
> The legal time, here in France and at this (winter) period, is
> GMT + 1, as shown correctly by the clock of my iMac, but "date"
> keeps returning GMT + 2.
Sounds like your harware clock is running at local time. What does
'hwclock --show --debug' say? Look for the line saying "Time read
from Hardware Clock:".
If the hardware clock is really set at UTC, do you maybe have TZ
set? 'echo $TZ'. If it is, then unset it: 'unset TZ', and then
see if date and hwclock operate correctly. And also check that the
symlink /etc/localtime points at the correct zone.
Benno
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-21 21:56 ` Benno Schulenberg
@ 2005-11-23 18:11 ` Charles Trois
2005-11-24 22:48 ` Benno Schulenberg
0 siblings, 1 reply; 13+ messages in thread
From: Charles Trois @ 2005-11-23 18:11 UTC (permalink / raw
To: gentoo-user
Benno Schulenberg a écrit :
> Charles Trois wrote:
>
>>The legal time, here in France and at this (winter) period, is
>>GMT + 1, as shown correctly by the clock of my iMac, but "date"
>>keeps returning GMT + 2.
>
>
> Sounds like your harware clock is running at local time. What does
> 'hwclock --show --debug' say? Look for the line saying "Time read
> from Hardware Clock:".
>
> If the hardware clock is really set at UTC, do you maybe have TZ
> set? 'echo $TZ'. If it is, then unset it: 'unset TZ', and then
> see if date and hwclock operate correctly. And also check that the
> symlink /etc/localtime points at the correct zone.
>
> Benno
Here are the results:
~ # hwclock --show --debug
hwclock from util-linux-2.12i
Using /dev/rtc interface to clock.
...
Hardware clock is on local time
Assuming hardware clock is kept in local time.
Waiting for clock tick...
...
Time read from Hardware Clock: 2005/11/23 19:04:14
Hw clock time : 2005/11/23 19:04:14 = 1132769054 seconds since 1969
Wed Nov 23 19:04:14 2005 -0.188934 seconds
~ # ls -l /etc/localtime
lrwxrwxrwx 1 root root 32 Nov 22 20:39 /etc/localtime ->
/usr/share/zoneinfo/Europe/Paris
and in /etc/conf.d/clock:
CLOCK="local"
echo $TZ returns nothing, so TZ is presumably not set.
All that seems correct to me, and yet the time returned by "date" is
still one hour fast.
What else can I check?
Charles
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-23 18:11 ` Charles Trois
@ 2005-11-24 22:48 ` Benno Schulenberg
2005-11-25 9:03 ` stuart
0 siblings, 1 reply; 13+ messages in thread
From: Benno Schulenberg @ 2005-11-24 22:48 UTC (permalink / raw
To: gentoo-user
Charles Trois wrote:
> ~ # ls -l /etc/localtime
> lrwxrwxrwx 1 root root 32 Nov 22 20:39 /etc/localtime ->
> /usr/share/zoneinfo/Europe/Paris
>
> and in /etc/conf.d/clock:
>
> CLOCK="local"
Did you maybe change this last one after your last reboot? Because
then the system time won't have changed accordingly. Do a 'hwclock
-hctosys' to set the system time from the hardware clock.
> What else can I check?
Is the clock initscript run? Check with 'rc-update -s'. If it is,
try removing it from the startup sequence, see if that solves it.
Is date maybe aliased? Check with 'type date'.
Benno
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-24 22:48 ` Benno Schulenberg
@ 2005-11-25 9:03 ` stuart
0 siblings, 0 replies; 13+ messages in thread
From: stuart @ 2005-11-25 9:03 UTC (permalink / raw
To: gentoo-user
On Thu, Nov 24, 2005 at 11:48:23PM +0100, Benno Schulenberg wrote:
> Charles Trois wrote:
> > ~ # ls -l /etc/localtime
> > lrwxrwxrwx 1 root root 32 Nov 22 20:39 /etc/localtime ->
> > /usr/share/zoneinfo/Europe/Paris
> >
> > and in /etc/conf.d/clock:
> >
> > CLOCK="local"
>
> Did you maybe change this last one after your last reboot? Because
> then the system time won't have changed accordingly. Do a 'hwclock
> -hctosys' to set the system time from the hardware clock.
>
> > What else can I check?
>
> Is the clock initscript run? Check with 'rc-update -s'. If it is,
> try removing it from the startup sequence, see if that solves it.
>
> Is date maybe aliased? Check with 'type date'.
>
> Benno
> --
> gentoo-user@gentoo.org mailing list
>
Hi
Not ideal but as a workaround should your investigation not go well you
could install an NTP type client. I would recommenf "chronyd" as a
simple way of doing this, worked a treat when I had a similar issue a
few monthes ago.
stu
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] system clock keeps getting reset to weird times
2005-11-18 22:14 ` Benno Schulenberg
2005-11-18 22:57 ` Richard Fish
2005-11-21 9:03 ` Charles Trois
@ 2005-11-22 4:25 ` Robert Persson
2 siblings, 0 replies; 13+ messages in thread
From: Robert Persson @ 2005-11-22 4:25 UTC (permalink / raw
To: gentoo-user
On November 18, 2005 02:14 pm Benno Schulenberg was like:
> Your time zone is correctly set?
> Check with 'ls -l /etc/localtime'.
I think the problem was a corrupt /etc/localtime.
When I set up the system I made /etc/localtime a symlink, but SOMETHING seemed
to have changed that and replaced it with a copy of (what I presume to have
been) the file the symlink should have been pointing to. Unfortunately it
must have been a corrupt copy. Deleting this file and reinserting the symlink
seems to have made the problem go away.
I think the guilty SOMETHING was most likely the kde date and time setting
utility.
Thanks once again to everybody for their help.
Robert
--
Robert Persson
"Don't use nuclear weapons to troubleshoot faults."
(US Air Force Instruction 91-111, 1 Oct 1997)
--
gentoo-user@gentoo.org mailing list
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-11-25 9:08 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-18 18:30 [gentoo-user] system clock keeps getting reset to weird times Robert Persson
2005-11-18 18:41 ` Arturo 'Buanzo' Busleiman
2005-11-18 22:14 ` Benno Schulenberg
2005-11-18 22:57 ` Richard Fish
2005-11-19 0:39 ` John J. Foster
2005-11-21 9:03 ` Charles Trois
2005-11-21 11:36 ` Stephen Micheals
2005-11-21 14:55 ` Richard Fish
2005-11-21 21:56 ` Benno Schulenberg
2005-11-23 18:11 ` Charles Trois
2005-11-24 22:48 ` Benno Schulenberg
2005-11-25 9:03 ` stuart
2005-11-22 4:25 ` Robert Persson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox