All of lore.kernel.org
 help / color / mirror / Atom feed
* system clock...
@ 2004-10-01 17:53 ` Ankit Jain
  0 siblings, 0 replies; 7+ messages in thread
From: Ankit Jain @ 2004-10-01 17:53 UTC (permalink / raw)
  To: admin

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* system clock...
@ 2004-10-01 17:53 ` Ankit Jain
  0 siblings, 0 replies; 7+ messages in thread
From: Ankit Jain @ 2004-10-01 17:53 UTC (permalink / raw)
  To: admin

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: system clock...
  2004-10-01 17:53 ` Ankit Jain
  (?)
@ 2004-10-01 18:03 ` J. David Boyd
  -1 siblings, 0 replies; 7+ messages in thread
From: J. David Boyd @ 2004-10-01 18:03 UTC (permalink / raw)
  To: linux-admin

Ankit Jain <ankitjain1580@yahoo.com> 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...


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: system clock...
  2004-10-01 17:53 ` Ankit Jain
  (?)
  (?)
@ 2004-10-01 18:04 ` Kurt Wall
  -1 siblings, 0 replies; 7+ messages in thread
From: Kurt Wall @ 2004-10-01 18:04 UTC (permalink / raw)
  To: admin

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."

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: system clock...
  2004-10-01 17:53 ` Ankit Jain
                   ` (2 preceding siblings ...)
  (?)
@ 2004-10-01 18:19 ` Ray Olszewski
  -1 siblings, 0 replies; 7+ messages in thread
From: Ray Olszewski @ 2004-10-01 18:19 UTC (permalink / raw)
  To: linux-newbie

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: system clock...
       [not found] <2KzRy-1BD-13@gated-at.bofh.it>
@ 2004-10-01 19:41 ` Jay Denebeim
  0 siblings, 0 replies; 7+ messages in thread
From: Jay Denebeim @ 2004-10-01 19:41 UTC (permalink / raw)
  To: linux-kernel

(Hopefully this will work, I haven't posted to the LKML with this
configuration.)

In article <2KzRy-1BD-13@gated-at.bofh.it>,
Ankit Jain  <ankitjain1580@yahoo.com> wrote:

>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 is one of two things.  First off, are you sure you're updating
the CMOS clock as part of your reboot process?  During initialization
the system reads the CMOS clock, so if you don't keep it updated the
time will always be incorrect.  You might want to look at the clock
from your BIOS to see what time it is.

The second issue is time zone.  Unless you have a dual boot system
this probably isn't an issue though.  If you have your CMOS clock set
to UTC and you use and unadulterated Windows then every time you boot
the other operating system your clock will be wrong.  Since you appear
to live in Italy though you shouldn't be at UTC +/- 6 hours, so this
is probably not the problem.

Hope this helps
Jay
-- 
* Jay Denebeim  Moderator       rec.arts.sf.tv.babylon5.moderated *
* newsgroup submission address: b5mod@deepthot.org                *
* moderator contact address:    b5mod-request@deepthot.org        *
* personal contact address:     denebeim@deepthot.org             *

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: system clock...
  2004-10-01 17:53 ` Ankit Jain
                   ` (3 preceding siblings ...)
  (?)
@ 2004-10-01 19:52 ` Simon Valiquette
  -1 siblings, 0 replies; 7+ messages in thread
From: Simon Valiquette @ 2004-10-01 19:52 UTC (permalink / raw)
  To: Ankit Jain; +Cc: admin

Ankit Jain a écrit :
> 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?
> 

   Typically, it is just a problem between the hardware clock using 
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 
software clock.  Windows use local time for the BIOS, while Linux 
normally use UTC.  So, if you reboot in Windows, the time will be 
correct.  Since Linux think that the BIOS is in UTC, it set its software 
clock with the time it found in the BIOS, and add (or substract) hours 
depending of the user time zone.

   "date" set only the software time.  "hwclock" is the one used at boot 
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. 
The simpliest is to just set your software time as you did, and set the 
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 
(probably --localtime) otherwise it is windows that will get the time 
wrong after the next reboot.  If you use only Linux/Unix, I would prefer 
to use --UTC but both works.


   Finally, it is also possible that your timezone is not properly 
adjusted in Linux (see tzset), but most people adjust it properly during 
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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-10-01 19:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <2KzRy-1BD-13@gated-at.bofh.it>
2004-10-01 19:41 ` system clock Jay Denebeim
2004-10-01 17:53 Ankit Jain
2004-10-01 17:53 ` Ankit Jain
2004-10-01 18:03 ` J. David Boyd
2004-10-01 18:04 ` Kurt Wall
2004-10-01 18:19 ` Ray Olszewski
2004-10-01 19:52 ` Simon Valiquette

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.