From owner-cvs-sbin Tue Apr 14 02:17:52 1998 Return-Path: Received: (from daemon@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA29357 for cvs-sbin-outgoing; Tue, 14 Apr 1998 02:17:52 -0700 (PDT) (envelope-from owner-cvs-sbin) Received: from rvc1.informatik.ba-stuttgart.de (rvc1.informatik.ba-stuttgart.de [141.31.112.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA29178; Tue, 14 Apr 1998 09:17:25 GMT (envelope-from helbig@Informatik.BA-Stuttgart.DE) Received: (from helbig@localhost) by rvc1.informatik.ba-stuttgart.de (8.8.8/8.8.5) id LAA00792; Tue, 14 Apr 1998 11:16:49 +0200 (MET DST) From: Wolfgang Helbig Message-Id: <199804140916.LAA00792@rvc1.informatik.ba-stuttgart.de> Subject: Re: cvs commit: src/sbin/adjkerntz adjkerntz.8 adjkerntz.c In-Reply-To: <199804112118.OAA02144@freefall.freebsd.org> from "Andrey A. Chernov" at "Apr 11, 98 02:18:57 pm" To: ache@FreeBSD.ORG (Andrey A. Chernov) Date: Tue, 14 Apr 1998 11:16:48 +0200 (MET DST) Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-sbin@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-cvs-sbin@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > ache 1998/04/11 14:18:57 PDT > > Modified files: > sbin/adjkerntz adjkerntz.8 adjkerntz.c > Log: > Implement Helbig idea of offset calculation reducing mktime() calls > Immediately exit if /etc/wall_cmos_clock not present Now, the `-s' option is obsolete, since there is no nonexisting local time during switch two or from daylight saving time. That is, for initial_sec >= 0, after local = localtime(&initial_sec); ... localsec = mktime(&local); you will always end up with localsec == initial_sec So the code of adjkerntz can be decomplexified in this respect. OTOH, you don't handle ambiguous CMOS local time during booting (adjkerntz -i) at all. Wolfgang > > Revision Changes Path > 1.15 +3 -3 src/sbin/adjkerntz/adjkerntz.8 > 1.23 +22 -22 src/sbin/adjkerntz/adjkerntz.c >