On Wednesday 28 November 2012 07:48:28 J. B wrote:
> On Wed, 28 Nov 2012 10:37:49 +0000
> 
> Darac Marjal <mailingl...@darac.org.uk> wrote:
> > On Wed, Nov 28, 2012 at 03:55:16PM +0530, J. B wrote:
> > > Hello list,
> > > 
> > > My box is configured to the local time zone from beginning, both
> > > hwclock and system time. But linux always favor hwclock to UTC. What
> > > is the advantage of doing that ?
> > > 
> > > If I need my hwclock to UTC then what should be the right way to do
> > > that ? I have followed "dpkg-reconfigure tzdata" and found it has
> > > changed the local time to UTC too. Confused .....
> > 
> > The problem is that the hardware clock doesn't store a timezone, so when
> > it reports the time as 10:32, is that 10:32 in your current time zone,
> > or 10:32 in a standardized time zone (i.e. UTC) or...
> > 
> > Which you choose doesn't really make much difference, so long as all
> > OSes that update the hwclock agree on what it's set to. You can agree to
> > keep it in UTC-5 if you like, even if that's NOT your local time zone,
> > just so long as you tell your system to apply the correct offset when
> > reading/writing it.
> > 
> > The main issue comes when you're dual-booting with Windows. By default,
> > that assumes the hwclock reads local time. If Linux thinks it should be
> > UTC, then you're going to see odd time jumps as you switch between them.
> > 
> > Hope that clarifies things.
> 
> Thanks for the points. This box doesn't have any window system.
> So please advise how can I set hwclock and localtime.
> 
> Thanks

/etc/default/hwclock
HWCLOCKACCESS=yes

dpkg-reconfigure tzdata
(set to your timezone)

or use /usr/bin/tzselect command

change time with "date" to local time.

OS takes care of the rest, so your hwclock is now set to UTC while date shows 
local time. TZDATA is updated whenever some countries like Argentina, decide 
to change the daylight saving time.

this document is not entirely up-to-date:
http://www.debian-administration.org/articles/213

/etc/default/rcS advises:
# assume that the BIOS clock is set to UTC time (recommended)
#UTC=yes # OBSOLETE; see /etc/adjtime and hwclock(8).

my /etc/adjtime right now:
1.868495 1354099078 0.000000
1354099078
UTC

man hwclock

HTH
Kind regards
Eike

-- 
What is the difference between an optimist and a pessimist?
An optimist thinks that we live in the best of all possible worlds.
A pessimist is afraid that the optimist might be right.

Reply via email to