in reply to Year Value Interpretation
The problem with years > 138 is that timestamps for the year 2038 don't fit into a 32 bit integer anymore.
This is fixed in current bleadperl. Maybe also some CPAN modules do correct date manipulation beyond 2038, maybe you should try some of them.
Update: I'm a bit curious - what do you need post-2038 dates for?
Second update: If you want to play with it a bit more I recommend POSIX::mktime:
# start of epoch $ perl -MPOSIX=mktime -wle 'print mktime(0,0,1,1,0,70);' 0 but true # before epoch $ perl -MPOSIX=mktime -wle 'print mktime(0,0,1,1,0,60);' -315619200 # "normal" dates: perl -MPOSIX=mktime -wle 'print mktime(0,0,1,1,0,100);' 946684800 # how close do we get to 2**32-1 ? $ perl -MPOSIX=mktime -wle 'print mktime(7,14,4,19,0,138);' 2147483647 $ perl -MPOSIX=mktime -wle 'print mktime(8,14,4,19,0,138);' Use of uninitialized value in print at -e line 1.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Year Value Interpretation
by Anonymous Monk on Apr 18, 2008 at 11:36 UTC | |
by Anonymous Monk on Apr 18, 2008 at 11:43 UTC |