Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 1998 14:01:51 +0400
From:      =?koi8-r?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru>
To:        Wolfgang Helbig <helbig@Informatik.BA-Stuttgart.DE>, Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: bin/6164
Message-ID:  <19980331140151.15579@nagual.pp.ru>
In-Reply-To: <199803302216.AAA08860@rvc1.informatik.ba-stuttgart.de>; from helbig@Informatik.BA-Stuttgart.DE on Tue, Mar 31, 1998 at 12:16:49AM %2B0200
References:  <199803301316.XAA29255@godzilla.zeta.org.au> <199803302216.AAA08860@rvc1.informatik.ba-stuttgart.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Mar 31, 1998 at 12:16:49AM +0200, Wolfgang Helbig wrote:
> > >Hmm. The reason for this warning message (``non existent UCT time'')
> > >is an erraneous use of mktime(3): mktime(3) *always* assumes
> > >that the passed tm structure (utc) holds *local* time, even if the
> > >parameter is filled by gmtime(3). 
> > >At March 29th 4:01 CEST gmtime() put 2:01 into utc, which is correct.
> > >Then mktime(3) assumes March 29th 2:01 *local* time which does not exist.
> > 
> > Isn't that the point of using local time?  The purpose of `adjkerntz -a'
> 
> I don't argue using local time or mktime() assuming local time.
> I just don't think it's a good idea to use mktime() with an argument
> that is supposed to hold utc time in order to calculate the
> offset from local time to utc.
> 
> Using tm_gmtoff looks better to me and does not need this sleep mode.

I tend to agree with Wolfgang since offset exist in this case despite the
fact that time not exist. F.e. mktime can return -1 for nonexisten 2:00
but we don't need to set that time, we need offset only (assuming cmos
clock is valid wall clock at the moment machine starts).

-- 
Andrey A. Chernov
http://www.nagual.pp.ru/~ache/
MTH/SH/HE S-- W-- N+ PEC>+ D A a++ C G>+ QH+(++) 666+>++ Y

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980331140151.15579>