Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Bob McElrath <mcelrath@draal.physics.wisc.edu>
To: axp-list@redhat.com
Subject: Re: January 19, 2038
Date: Thu, 28 Jan 1999 22:37:21 -0600 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.04.9901282233020.667-100000@draal.physics.wisc.edu> (raw)
In-Reply-To: <199901290404.VAA05901@ellpspace.math.ualberta.ca>

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


  reply	other threads:[~1999-01-29  4:38 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-01-28 16:28 January 19, 2038 Dan Morrill
1999-01-28 21:24 ` Paul Tomblin
1999-01-28 22:18   ` mgraffam
1999-01-29  0:42   ` Re[2]: " Dan
1999-01-29  0:56     ` Paul Tomblin
1999-01-28 21:26 ` Andrei A. Dergatchev
1999-01-28 22:37 ` Bob Taylor
1999-01-28 22:51   ` Daniel J. Frasnelli
1999-01-28 23:08     ` Richard Hadsell
1999-01-28 23:20       ` Daniel J. Frasnelli
1999-01-29  4:24       ` Michal Jaegermann
1999-01-29  4:51       ` Quant-X Alpha Linux Support
1999-01-28 23:07   ` off-topic thought on problematic dates (was Re: January 19, 2038) Ari Jort
1999-01-29  0:08     ` Paul Tomblin
1999-01-28 23:23   ` January 19, 2038 Adam C. Powell, IV
1999-01-29  3:42     ` Bob Taylor
1999-01-29  4:04 ` Michal Jaegermann
1999-01-29  4:37   ` Bob McElrath [this message]
1999-01-29  4:51     ` Michal Jaegermann
  -- strict thread matches above, loose matches on Subject: below --
1999-01-28 22:58 Peter W. Borders
1999-01-29  9:51 Wessels, Hans
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox