system clock...
am 01.10.2004 19:53:13 von ankitjain1580
hi
i have a problem with my system clock.
whenever i reboot or start my system my clock is
incremented by around 6 hrs. after that its alright
i.e if i correct the time it dosent mis behave but i
dont know whats wrong in reboot or booting the sys?
if somebody can help or faced this kinda situation?
thanks
ankit jain
____________________________________________________________ ____________
Yahoo! Messenger - Communicate instantly..."Ping"
your friends today! Download Messenger Now
http://uk.messenger.yahoo.com/download/index.html
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: system clock...
am 01.10.2004 20:03:46 von dave
Ankit Jain writes:
> hi
>
> i have a problem with my system clock.
>
> whenever i reboot or start my system my clock is
> incremented by around 6 hrs. after that its alright
> i.e if i correct the time it dosent mis behave but i
> dont know whats wrong in reboot or booting the sys?
>
> if somebody can help or faced this kinda situation?
>
This seems to be a common problem. I've had it myself, but I don't recall how
I fixed it, it was something to do with a setting in my Mandrake Linux control
panel.
I just saw a document here last week that referenced this problem, and how to
fix it, so hopefully someone will come along with the answer.
The problem is that your real-time hardware clock is using a different time
zone than your system clock, so when you reboot, one or the other updates the
other one, and things go awry...
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: system clock...
am 01.10.2004 20:04:11 von Kurt Wall
On Fri, Oct 01, 2004 at 06:53:13PM +0100, Ankit Jain took 24 lines to write:
> hi
>
> i have a problem with my system clock.
>
> whenever i reboot or start my system my clock is
> incremented by around 6 hrs. after that its alright
> i.e if i correct the time it dosent mis behave but i
> dont know whats wrong in reboot or booting the sys?
>
> if somebody can help or faced this kinda situation?
hwclock shouls fix your situation.
Kurt
--
"I found out why my car was humming. It had forgotten the words."
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: system clock...
am 01.10.2004 20:19:42 von Ray Olszewski
At 06:53 PM 10/1/2004 +0100, Ankit Jain wrote:
>hi
>
>i have a problem with my system clock.
>
>whenever i reboot or start my system my clock is
>incremented by around 6 hrs. after that its alright
>i.e if i correct the time it dosent mis behave but i
>dont know whats wrong in reboot or booting the sys?
>
>if somebody can help or faced this kinda situation?
Where do you live? Not your street address, just your local time zone.
It is likely that there is a mismatch between the way your hardware clock
is set and the way Linux thinks it is set. For example, your hardware clock
is set for local time, but Linux thinks it is set for UT (Universal Time,
also called Greenwich Time), so during boot/init converts this setting to
your local time zone. Or it may be the other way around, depending on
whether your local time zone is +600 or -600.
Or, just conceivably, there is a time-zone mismatch between the init script
that reads the hardware clock and the shutdown script that uses the kernel
clock to update the hardware clock.
The details of how to fix this depend on which way the problem is
occurring, which way you need your hardware clock to be set (for example,
if you dual boot, I believe Windows expects the hardware clock to show
local time; Linux-only systems customarily run UT hardware clocks), and
what Linux distro/version you are using.
Oh, one last thing ... you say "around" 6 hours, not exactly 6 hours. This
indicates clock drift in the hardware clock, a very normal thing on PCs,
which use very cheap clock hardware. The usual solution to clock drift,
under Linux (and even under Windows), is to use an NTP (Network Time
Protocol) deamon to sync the kernel clock to an ntp server and to correct
for drift locally. Read up on this in the usual places, including the man
pages for ntpd (the daemon) and ntpdate (a client that only re-syncs the
clock periodically, normally from a cron script).
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Re: system clock...
am 01.10.2004 21:52:39 von Simon Valiquette
Ankit Jain a =E9crit :
> hi
>=20
> i have a problem with my system clock.
>=20
> whenever i reboot or start my system my clock is
> incremented by around 6 hrs. after that its alright
> i.e if i correct the time it dosent mis behave but i
> dont know whats wrong in reboot or booting the sys?
>=20
> if somebody can help or faced this kinda situation?
>=20
Typically, it is just a problem between the hardware clock using=20
local time and the kernel using UTC (Greenwich time) or the opposite.
You have to know that there is a hardware clock (in the BIOS) and a=20
software clock. Windows use local time for the BIOS, while Linux=20
normally use UTC. So, if you reboot in Windows, the time will be=20
correct. Since Linux think that the BIOS is in UTC, it set its softwar=
e=20
clock with the time it found in the BIOS, and add (or substract) hours=20
depending of the user time zone.
"date" set only the software time. "hwclock" is the one used at boo=
t=20
time to set the software clock.
Try this as root (or pick a look at /etc/adjtime ):
hwclock --utc
hwclock --localtime
It shows the time of your BIOS, and one of them is probably good.=20
The simpliest is to just set your software time as you did, and set the=
=20
hardware clock the way you want (UTC or local time).
hwclock --utc --systohc
hwclock --localtime --systohc
If you use Windoze, takes what works from the previous commands=20
(probably --localtime) otherwise it is windows that will get the time=20
wrong after the next reboot. If you use only Linux/Unix, I would prefe=
r=20
to use --UTC but both works.
Finally, it is also possible that your timezone is not properly=20
adjusted in Linux (see tzset), but most people adjust it properly durin=
g=20
Linux installation.
Simon Valiquette
http://www.gulus.org
-
To unsubscribe from this list: send the line "unsubscribe linux-admin" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html