he cannot really fix it on his own. Try this: on your PC, set date to 01-01-2039, by doing this:
date 01-01-2039
then run this perl program:
print time();
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)
In reply to Re: Re: 2038 bug
by pg
in thread 2038 bug
by toma
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.