From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 31566 invoked from network); 29 Jan 1999 04:38:30 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 29 Jan 1999 04:38:30 -0000 Received: from draal.physics.wisc.edu (mcelrath@draal.physics.wisc.edu [128.104.223.134]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id XAA04614 for ; Thu, 28 Jan 1999 23:37:28 -0500 Received: from localhost (mcelrath@localhost) by draal.physics.wisc.edu (8.8.7/8.8.7) with ESMTP id WAA26826 for ; Thu, 28 Jan 1999 22:37:22 -0600 Date: Thu, 28 Jan 1999 22:37:21 -0600 (EST) From: Bob McElrath To: axp-list@redhat.com Subject: Re: January 19, 2038 In-Reply-To: <199901290404.VAA05901@ellpspace.math.ualberta.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Thu, 28 Jan 1999, Michal Jaegermann wrote: > Dan Morrill wrote: > > > > > > I have read that the "UNIX" clock's mechanism of counting the seconds > > since January 1, 1970 will exceed the range of the 32 bit field used to > > store it on January 19, 2038 at 3:14:07. > > Watch what you read. If you would read this list then you would > notice something I posted a few days ago on this list. > > $ perl -e 'print scalar gmtime 2**31, "\n"' > Tue Jan 19 03:14:08 2038 > $ perl -e 'print scalar gmtime 2**32, "\n"' > Sun Feb 7 06:28:16 2106 > $ perl -e 'print scalar gmtime 2**55, "\n"' > Sun Jun 13 06:26:08 1141709097 > > Besides this is a clear application and library issue and has nothing > to do with "UNIX". Did you look, by any chance, on a range of dates > in Oracle on 32-bit machines? Even with all deficiencies of that > date-stamp? Just an example. Here's an interesting one for you: Why does this happen? ;) > perl -e 'print scalar gmtime 0xf0c29d868bfd7f, "\n"' Tue Dec 31 23:59:59 2147483647 > perl -e 'print scalar gmtime 0xf0c29d868bfd80, "\n"' Wed Jan 1 00:00:00 -2147483648 Note that the only difference between those numbers is the least-significant bit (1 year). This is about 9 bits short of using the full 64 bits. Yes, I know the answer. But interesting to think of all the unsuspecting people (Will there be people) 2,147,483,647 years from now, suddenly living in negative times! -- Bob Bob McElrath (rsmcelrath@students.wisc.edu) Univ. of Wisconsin at Madison