[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] MiNTLib Non-Bug



Hi Andreas,

On Tue, Aug 03, 1999 at 11:57:04AM +0200, Andreas Schwab wrote:
> Guido Flohr <gufl0000@stud.uni-sb.de> writes:
> 
> |> Well, it turned out that they had forgotten the leapseconds which are
> |> periodically inserted to correct discrepancies between atomic time and
> |> the earth's rotation.  That is the reason why you have the subdirectories
> |> `posix' and `right' in `/usr/share/zoneinfo'.  By default the MiNTLib
> |> violates POSIX and takes leapseconds into account.
> 
> IMHO you should not do that.  Every other system uses the POSIX rules, and
> only those that really care about leapseconds switch to the right ones.
> You really don't need leapseconds on an average system.
> 
> Everyone should use UT for the hw clock, really.

The hardware clock always runs in UTC and it always takes leapseconds into
account, on every system.

The problem arises only from the manner in which time_t values get
calculated.  If you don't consider leapseconds you will get a value
which is currently 21 less than values calculated with leapseconds
properly handled.  This makes comparisons difficult.  There are 
libc functions that can solve these problem when communicating 
time_t values with other systems but for MiNT you are probably right.
I will change the default to posixly correct because there are
too many programs that are not linked with the MiNTLib.

The fix (until the next MiNTLib): If your timezone is currently
`Antarctica/South_Pole' run the command

	/usr/sbin/zic -l posix/Antarctica/South_Pole -p posix/Antarctica/South_Pole

This will set up the links in /usr/share/zoneinfo so that leapseconds
will be ignored from now on.  If you compile a new MiNTLib, edit
`configvars', change the value of the variable `REDO' from
`right_posix' to `posix_right' and rebuild the database (with
`make install' in subdirectory `tz').

If you have changed the behavior to ignore leapseconds but there is
a situation where you need proper leapseconds handling set the
envariable $TZ temporarily to `right/Antarctica/South_Pole' (i. e.
prefix your normal timezone with `right/').

Ciao

Guido
-- 
http://stud.uni-sb.de/~gufl0000/
mailto:gufl0000@stud.uni-sb.de
      \   |__
       ####  \ /    Total solar eclipse of 1999 August 11
     ######## |_    over Saarbr?cken/Germany.
     ######## |     Countdown: 07d18h50m07s.
       ####__/ \
      /   |