Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

schwern (1528)

schwern
  (email not shown publicly)
http://schwern.net/
AOL IM: MichaelSchwern (Add Buddy, Send Message)
Jabber: schwern@gmail.com

Schwern can destroy CPAN at his whim.

Journal of schwern (1528)

Saturday September 13, 2008
07:03 AM

Y2038 Grant Update: bleadperl branch fixes 2038 bug

[ #37434 ]

After a few months of being distracted, I've finally gotten off my ass and hammered the Y2038 fix for perl into production-worthy code. It came together rather quickly for someone that barely knows C. There's now a bleadperl branch with the fix. Hopefully it'll be merged into trunk soon.

$ ./perl -wle 'print scalar localtime(2**34)'
Tue May 29 18:53:04 2514

I even fixed Time::Local.

$ ./perl -Ilib -MTime::Local -wle 'print scalar localtime(timelocal(1, 2, 3, 4, 5, 2258))'
Fri Jun  4 03:02:01 2258

And at no loss of performance (ok, gmtime runs 10% slower). There is a limit, because it still uses the system's tm struct to return the date it will only go out to the year 2147483647 (tm.tm_year being a signed 32 bit integer). I could fix that in Perl... but for some reason I just don't feel like it's a priority.

I really need that branch knocked around to check its portability. I've taken care of everything I'm aware of. If you can't handle git, here's a patch. Please try it out and let me know.

Oh, and I desperately need experience C programmers to join the project. For example, the project has no installer because autoconf terrifies me. Visit the y2038 project home, sign up for the discussion list and say hi.

The y2038 project has expanded into creating a complete replacement for time.h. I'm next targeting Python and Ruby where I've identified 2038 bugs.

Oh, at some point I'll write up how the fix works.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.