Linux and UK Summer Time

Linux and UK Summer Time

Post by Nick Brand » Sun, 31 Dec 1899 09:00:00



Hi people

Can anyone succesfully set up linux to alter its time automatically
during British Summer Time. What ever time zone I set it to, it still
requires me to manually adjust the clock.

(BTW, I have tried on RH 5.0 and SuSE 6.1)

Any help/info would be apprecited.

thanks in advance

Nick Brandon

 
 
 

Linux and UK Summer Time

Post by Paul Kimo » Sun, 31 Dec 1899 09:00:00



> Can anyone succesfully set up linux to alter its time automatically
> during British Summer Time. What ever time zone I set it to, it still
> requires me to manually adjust the clock.

Preliminaries:

There are (at least) three "times" that you are interested in:
(1) the "hardware" clock that keeps going even when the computer
is off, (2) the internal software time that the system keeps, and
(3) the (system) time as modified by the appropriate time zone,
for use by programs.

On unix systems, the internal system time (#2) is always in UTC
(== GMT).  The hardware clock (#1) is whatever it's been set to,
and can be displayed and manipulated using the hwclock(8) program.

The internal system time (#2) is set from the hardware clock (#1)
at bootup.  Depending on how you set it up, it does the appropriate
thing in converting (or not converting) the hardware time to UTC.
(The conversion, if necessary, of course assumes that you have
made the correct choice for /etc/localtime.)

The display of time in programs (#3) is done via the C library,
which gets its idea of the local time zone from the /etc/localtime
file or the TZ environment variable.  (/etc/localtime is usually
a symbolic link to some file in /usr/share/zoneinfo.  You can use
the "tzconfig" program to help you determine which zoneinfo file
you should be using.)

Diagnoses:

The unix convention is to keep the hardware clock (#1) in UTC.
This is almost certainly the right solution, particularly if you
do not run non-unix operating systems on your hardware.  Then the
hardware (#1) and the internal software (#2) clock will just stay
on UTC, and the C library will be able to convert to the right
local time (#3), even through the time jumps in the spring and
fall.

If you do not keep the hardware clock (#1) in UTC, your unix
system will still behave correctly through time jumps _if it is
up_.  That is because the internal system time (#2) should be in
UTC, which does not jump, and the conversion to local time happens
on the fly.  However, the hardware clock (#1) will then be wrong.
I believe that most systems are set up so that the hardware clock
(#1) is reset from the system time (#2) during a clean shutdown,
which should take care of the problem.  Check your shutdown scripts
to be sure.

If you do not keep the hardware clock (#1) in UTC, and the system
is _down_ during the time jump, the hardware time (#1) will be wrong
when the system comes up; the internal system time (#2) will be
set under the assumption that the hardware time (#1) is correct
according to the post-jump time; the converted local time (#3)
will be displayed according to the post-jump time.  The system will
have to be adjusted manually.

--


 
 
 

Linux and UK Summer Time

Post by QuestionExchang » Sun, 31 Dec 1899 09:00:00


Quote:> Hi people

> Can anyone succesfully set up linux to alter its time
automatically
> during British Summer Time. What ever time zone I set it to,
it still
> requires me to manually adjust the clock.

> (BTW, I have tried on RH 5.0 and SuSE 6.1)

Well, you should set your computers internal clock to
GMT (UTC as it is called now). Then set the correct
timezone and it should work.
There are two things to look out:
1.) It's some non standard time change, so it's not in
    timezone description. Well shouldn't happen, as you
    wouldn't probably to have your own private timezone,
    wouldn't you.
2.) The rules about time zones changed in relativly
    near past. If they did, you could happen to need an
    upgrade of your timezone files.
Andreas
==========MODIFIED=========
10/28/99 12:08 PM
===========================
Redhat comment:
You can change which way the system expects the hardware
time by changing the UTC setting to true in
/etc/sysconfig/clock.
After that you can write out the current system time
by executing "/sbin/clock -w -u".
(the -u makes /sbin/clock store the UTC time)
SuSE comment:
I'm not a SuSE user (no I'm not to explain why :) ).
You should find the settings probably in /etc/rc.config
(type "locate rc.config" to find the exact location.)
With SuSE it's probably safer to change it via YaST.
Andreas

--
  This answer is courtesy of QuestionExchange.com
  http://www.questionexchange.com/showUsenetGuest.jhtml?ans_id=6585&cus...