[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian and the millenium bug



In message <[🔎] xe1lnwx6mu7.fsf@paycheck.thok.org> you write:
|> a 64 bit variable, it's good for another 4000 years.
|
|Uhhh -- no.  If it went from 32 bits to *33* bits, that would get us

Actually, the current limit of 68 years (1970 + 68 = 2038) is posed by
the used of SIGNED int (31 bits) instead of unsigned bits:

|butch| bc -l
bc 1.04
Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
2^31
2147483648
2^31/(60*60*24*365)
68.09625976661593099949

Just moving to unsigned int will give you 68 more years, up to year 2106:

2^32
4294967296
2^32/(60*60*24*365)
136.19251953323186199898
1970+136
2106

So it's even simpler in regards of type size, but moving to an
unsigned int may cause serious troubles in comparing dates (unless you
use some functions which hide thedetails).

|4000 years.  This gets us more like 16 billion billion years (american
|billions - 16 x 10^18 is what I mean, but it's off the top of my head...)

Where did you get this 4000 years figure anyway?  33 bits would just
double the duration from 136 years to 272 (bringing us to year 2242).

Cheers,

--Amos

--Amos Shapira                    | "Of course Australia was marked for
133 Shlomo Ben-Yosef st.          |  glory, for its people had been chosen
Jerusalem 93 805                  |  by the finest judges in England."
ISRAEL        amos@gezernet.co.il |                     -- Anonymous


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: