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

Re: [MiNT] new UTC/NTP documentation uploaded



On Tue, Dec 19, 2000 at 01:16:29PM +0200, Martin-Éric Racine wrote:
> On Mon, 18 Dec 2000, Guido Flohr wrote:
> 
> > Under MiNT the time warp is therefore initiated by an
> > Ssystem(2) call and the 'tz_minuteswest' member of struct
> > timezone is always significant, both in Tsettimeofday(2) and
> > Tgettimeofday(2).
> 
> > P.S.: In the GNU libc for Linux, settimeofday() is only a
> > wrapper around stime() and a non-NULL timezone argument will
> > generate an ENOSYS.
> 
> On MiNT, does stime() always work in UTC?  

Yes.

> Basically, K9 works by assuming that Tsettimeofday operates in
> UTC and thus systematically treats the second argument as NULL;
> its content is ignored.  This is the correct behavior on most
> Unices, as far as the NTP development team tells me.

The first argument to settimeofday and/or gettimeofday is always a pointer
to a struct timeval, representing the time in UTC and the second argument
is implementation-specific and should be ignored.

> 
> If MiNT has a funtion that is designed to set the kernel's UTC
> reference, leaving it up to the kernel to adjust the timezone
> difference afterwards, I could easily patch K9 to work on MiNT
> as expected.

There is no need to patch that.  The kernel needs the patch since setting
the time doesn't work reliably.

Ciao

Guido