gabriel rosenkoetter on Sun, 21 Apr 2002 22:54:45 -0400


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

Re: [PLUG] 35 years from now...


On Sun, Apr 21, 2002 at 08:29:38PM -0400, Michael F. Robbins wrote:
> AFAIK, in the year 2037, the number of seconds from unix epoch (Jan 1
> 1970) will overflow the size of a signed 32-bit storage field.  However,
> in my PHP programs, I commonly use the time() function (identical to
> date('U')) because it's easy to do math with.  I know that this is
> looking quite far down the road, but how do I deal with this in my PHP
> programs?  Will PHP evolve to return a different data type?  How is this
> problem being dealt with in the C/C++ world?

People are mostly aware of these problems these days.

If, in 2037, your PHP stuff is still running in the same version of
PHP on the same version of the operating system, on the same
hardware it is now, it will break.

Far more likely, though, the implementation of either PHP's time()
function or the operating system's function backing it is already
abstracted enough that it will magically get backed by 64-bit (or,
really, by that time, probably 512- or 1024-bit data types,
following current trends; provided the benefit of larger data types
overcomes the cost of taking up ridiculous amounts of space for one
word).

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpR0r8tDX3p3.pgp
Description: PGP signature