in reply to
Re: 2038 bug
in thread 2038 bug
he cannot really fix it on his own. Try this: on your PC, set date to 01-01-2039, by doing this:
then run this perl program:
you will get a negative number back. That's the limitation sort of thing, not a bug in his code. Try this code:
print time(); # set time to 01-01-2038 before try this code
print(2 ** 31 - 1);
Look at how close those two numbers are, now you realize that's the up limitation of positive integers on 32 bit machine.
I don't worry about this too much, most likely when 2038 approaches, 64 bit or something even better will dominate.
(Set time to 2038-01-18-20:14:06, and see what happens to the above demo, also 2038-01-18-20:14:07)