From owner-freebsd-questions Mon Oct 27 08:45:12 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id IAA01524 for questions-outgoing; Mon, 27 Oct 1997 08:45:12 -0800 (PST) (envelope-from owner-freebsd-questions) Received: from bagpuss.visint.co.uk (bagpuss.visint.co.uk [194.207.134.1]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id IAA01477; Mon, 27 Oct 1997 08:44:32 -0800 (PST) (envelope-from steve@visint.co.uk) Received: from dylan.visint.co.uk (dylan.visint.co.uk [194.207.134.180]) by bagpuss.visint.co.uk (8.7.5/8.7.3) with SMTP id QAA01616; Mon, 27 Oct 1997 16:39:49 GMT Date: Tue, 29 Feb 2000 04:57:07 +0000 (GMT) From: Stephen Roome To: "Jonathan M. Bresler" cc: freebsd-questions@FreeBSD.ORG Subject: Re: 2000 Compliance / dates / time libs In-Reply-To: <199710271629.IAA00243@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Mon, 27 Oct 1997, Jonathan M. Bresler wrote: > Stephen Roome wrote: > > > > > > I just set my clock to february 29 2000. Is this valid ? > > the algorithm, as i understand it is: > > if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) > it is a leap year. > > this is only good back till the switch from julian to gregorian > calendars. [You stole this from k&r didn't you =), well, that's the only place I remember seeing this, especially in this format in C.] But anyway, that was my assumption as well, but I've heard otherwise and ensuring that FreeBSD gets the leap/non-leap year bit of 2000 correct is probably quite important. So when (or if) does the julian/gregorian switch take place and have you got any hints where I should "point my browser and surf to", or perhaps a slightly reliable source of information such as a book. I've heard (I don't trust this source though!) that there maybe an ISO committee for this. Steve. Steve Roome - Vision Interactive Ltd. Tel:+44(0)117 9730597 Home:+44(0)976 241342 WWW: http://dylan.visint.co.uk/