From owner-freebsd-hackers@FreeBSD.ORG Fri Jan 2 03:29:53 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4625106566C for ; Fri, 2 Jan 2009 03:29:53 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id 800788FC26 for ; Fri, 2 Jan 2009 03:29:53 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-255-48-78.bredband.comhem.se ([83.255.48.78]:61248 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1LIajQ-0000kF-5I for freebsd-hackers@freebsd.org; Fri, 02 Jan 2009 04:29:52 +0100 Received: (qmail 90472 invoked from network); 2 Jan 2009 04:29:49 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 2 Jan 2009 04:29:49 +0100 Received: (qmail 34119 invoked by uid 1001); 2 Jan 2009 04:29:49 +0100 Date: Fri, 2 Jan 2009 04:29:49 +0100 From: Erik Trulsson To: Darren Pilgrim Message-ID: <20090102032949.GA33780@owl.midgard.homeip.net> References: <495D7421.1090208@bitfreak.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <495D7421.1090208@bitfreak.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-IP: 83.255.48.78 X-Scan-Result: No virus found in message 1LIajQ-0000kF-5I. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1LIajQ-0000kF-5I 699e4318d919f1a30083e628fbcd9aca Cc: freebsd-hackers@freebsd.org Subject: Re: Is the FreeBSD clock UTC or TAI? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2009 03:29:54 -0000 On Thu, Jan 01, 2009 at 05:55:45PM -0800, Darren Pilgrim wrote: > This came up during discussion of leap seconds and why UTC and TAI are > different. My question is, does FreeBSD's internal clock use UTC or TAI > for timekeeping? That is, is wallclock calculated from an exact count > of the number of seconds since epoch (TAI), then adjusted with a leap > seconds table to match UTC, or does it internally use UTC and have code > to deal with the ambiguous seconds that occur at each leap second? I think the answer is no. Instead I believe FreeBSD follows the POSIX rules which mandates using UTC, while completely ignoring the concept of leap seconds. There was a long thread over on freebsd-current@ in early January 2006 titled "FreeBSD handles leapsecond correctly" that discussed this at length. (The general consensus seems to have been that leap seconds are evil and a PITA and essentially impossible to handle 'correctly' since various standards differ on how they should be handled. What to do about them is less clear however.) -- Erik Trulsson ertr1013@student.uu.se