From owner-freebsd-bugs Tue Mar 31 02:07:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA24710 for freebsd-bugs-outgoing; Tue, 31 Mar 1998 02:07:45 -0800 (PST) (envelope-from owner-freebsd-bugs@FreeBSD.ORG) Received: from ache.relcom.ru (ache@ache.relcom.ru [193.125.20.108]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA24695 for ; Tue, 31 Mar 1998 02:07:34 -0800 (PST) (envelope-from ache@ache.relcom.ru) Received: (from ache@localhost) by ache.relcom.ru (8.8.8/8.8.8) id OAA01106; Tue, 31 Mar 1998 14:01:51 +0400 (MSD) (envelope-from ache) Message-ID: <19980331140151.15579@nagual.pp.ru> Date: Tue, 31 Mar 1998 14:01:51 +0400 From: =?koi8-r?B?4c7E0sXKIP7F0s7P1w==?= To: Wolfgang Helbig , Bruce Evans Cc: freebsd-bugs@FreeBSD.ORG Subject: Re: bin/6164 Mail-Followup-To: Wolfgang Helbig , Bruce Evans , freebsd-bugs@FreeBSD.ORG References: <199803301316.XAA29255@godzilla.zeta.org.au> <199803302216.AAA08860@rvc1.informatik.ba-stuttgart.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1i 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 +0200 Organization: Biomechanoid Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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