From owner-freebsd-questions Mon May 18 10:47:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA24355 for freebsd-questions-outgoing; Mon, 18 May 1998 10:47:19 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from federation.addy.com (federation.addy.com [207.239.68.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA24286 for ; Mon, 18 May 1998 10:47:04 -0700 (PDT) (envelope-from fbsdlist@federation.addy.com) Received: from localhost (fbsdlist@localhost) by federation.addy.com (8.8.5/8.6.12) with SMTP id NAA24263 for ; Mon, 18 May 1998 13:47:01 -0400 (EDT) Date: Mon, 18 May 1998 13:47:00 -0400 (EDT) From: Cliff Addy To: questions@FreeBSD.ORG Subject: Year 2038 or 2106? Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'd always read that fbsd was good until at least 2038, as far as date/time computations, since the time is stored as a 32-bit integer of seconds since the Jan 1, 1970. Just on a whim, I decided to check this. I took 2^32/60/60/24/365 and added that to 1970. Now, I know I didn't account for leap years, but I still come out to the 2106, not 2038. I always assumed that an *unsigned* integer was used, if I use a signed integer I get 2^31/60/60/24/365 plus 1970 which *does* yield 2038. So, I guess my questions are: Is the date an unsigned or signed integer? If signed, why? If unsigned, why isn't the "date of death" 2106? Or did I just completely misunderstand or miscalculate? Too much time on my hands ... Cliff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message