From owner-freebsd-current@FreeBSD.ORG Tue Jan 3 16:26:23 2006 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EC4316A41F for ; Tue, 3 Jan 2006 16:26:23 +0000 (GMT) (envelope-from jd@ugcs.caltech.edu) Received: from lira.ugcs.caltech.edu (lira.ugcs.caltech.edu [131.215.176.118]) by mx1.FreeBSD.org (Postfix) with ESMTP id C781443D55 for ; Tue, 3 Jan 2006 16:26:22 +0000 (GMT) (envelope-from jd@ugcs.caltech.edu) Received: by lira.ugcs.caltech.edu (Postfix, from userid 3640) id 493606B002; Tue, 3 Jan 2006 08:26:21 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by lira.ugcs.caltech.edu (Postfix) with ESMTP id 08FE25300A; Tue, 3 Jan 2006 08:26:21 -0800 (PST) Date: Tue, 3 Jan 2006 08:26:20 -0800 (PST) From: Jon Dama To: Poul-Henning Kamp In-Reply-To: <83586.1136285992@critter.freebsd.dk> Message-ID: References: <83586.1136285992@critter.freebsd.dk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Peter Jeremy , current@freebsd.org, "M. Warner Losh" Subject: Re: FreeBSD handles leapsecond correctly X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Jan 2006 16:26:23 -0000 I think you had the answer more clearly earlier. Computers display event times in UTC, but intervals are based on SI seconds (and now finer granuality). I might be crazy, but I understand stopwatch seconds after the epoch (SI) to be the fundamental unit of POSIX time. Days, Hours, Months, etc simply does not enter into the consideration except in the context of "formating functions" such as gmtime(), localtime(), mktime(), etc. Here I agree that POSIX is lying when it suggests you can get UTC time out without leapsecond tables, but this does not seem to be a very fundamental problem. difftime operates on stopwatch seconds after the epoch. It is quite informative to realize that time_t has sub-second granularity whereas struct tm have seconds as their smallest unit of time. Typically on any instrument, at least the least significant digit is considered approximate. Such will be the case in regards to the POSIX definition of time for some years into the future. So chill. If you just avoid discussing the translation of stopwatch seconds into minutes/hours/days the problem goes away and we can all chalk up that conversion of seconds into minutes/hours/days that we all learned in grade school as another poorly explained simplification and proceed to unlearn it from our minds.