From owner-cvs-all@FreeBSD.ORG Tue Dec 27 21:50:40 2005 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 766AA16A41F; Tue, 27 Dec 2005 21:50:40 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A4F643D78; Tue, 27 Dec 2005 21:50:34 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id jBRLnJKB020676; Tue, 27 Dec 2005 14:49:19 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 27 Dec 2005 14:49:28 -0700 (MST) Message-Id: <20051227.144928.82232329.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <47758.1135718178@critter.freebsd.dk> References: <20051227.140049.73660062.imp@bsdimp.com> <47758.1135718178@critter.freebsd.dk> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 27 Dec 2005 14:49:20 -0700 (MST) Cc: trhodes@freebsd.org, scottl@samsco.org, src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org, fullermd@over-yonder.net, linimon@lonesome.com Subject: Re: cvs commit: src/sys/sys _timeval.h src/sys/fs/procfs procfs_status.c src/libexec/bootpd bootpd.c src/sys/dev/acpica/Osd OsdSynch.c src/sys/dev/firewire sbp.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Dec 2005 21:50:40 -0000 In message: <47758.1135718178@critter.freebsd.dk> "Poul-Henning Kamp" writes: : Imagine if the epoch for 64 bit time_t was set to coincide with Julian : Day zero using the rather naiive POSIX math: : N [days] * 86400 [seconds/day] : Converting from an old time_t to the new one would entail adding an : constant offset, no big deal. I'd rather see it as Modified Julian Day, since the MJD has an epoch that starts at midnight, while JD starts at noon. This is a change since the current Unix Epoch starts at midnight. MJD = JD - 2400000.5 It is 24537312.4 JD and 53731.9 MJD, more or less, UTC as I write this. Either epoch is fine for the range of the 64-bit number. In fact, you can encode about a size hundred thousand range of years (+- 292271 years) of microseconds as a 64-bit number. Nano seconds give only about 300 years. The microsecond conversion would be also easy and trivial.... Warner P.S. http://tycho.usno.navy.mil/mjd.html is a good reference for mjd if you're unfamiliar with what phk and I are talking about.