joomla.2038bug.com

  • Increase font size
  • Default font size
  • Decrease font size
Home Updates
News

Perl 5.12.0 Year 2038 Ready

E-mail Print PDF

Since early 2008 the y2038 code project by Michael G Schwern has been working on 2038 bug fixes for interpretor languages like Perl, Ruby and Python, basing some of their code on the examples here on 2038bug.com.

Perl 5.12.0 has now been released  and includes these fixes.

This is a significant milestone being the first major software package to explicitly fix 2038 bug issues. Indeed this release represents the kick-off toward industry acceptance of the seriousness of this problem and the start toward cleaning up all 2038 bugs in all code on earth.

Last Updated on Tuesday, 04 May 2010 09:19
 

Year 2038 Bug Update : 01/2004 - Problems Have Arrived

E-mail Print PDF

Update: 01/2004

 

The first 2038 problems are already here. Many 32-bit programs calculate time averages using:

(t1 + t2)/2
It should be quite obvious that this calculation fails when the time values pass 30 bits. The exact day can be calculated by making a small Unix C program, as follows:

 

echo 'long q=(1UL<<30);int main(){return puts(asctime(localtime(&q)));};' \  > x.c && cc x.c &&./a.out


In other words, on the 10th of January 2004 the occasional system will perform an incorrect time calculation until its code is corrected.

Thanks to Ray Boucher for this observation. 

The temporary solution is to replace all

(t1 + t2)/2
with
(((long long) t1 + t2) / 2) (POSIX/SuS)
or
(((double) t1 + t2) / 2) (ANSI)


Alternatively avoid casts and use:
(t1/2 + t2/2 + (t1&t2&1))

Thanks to Brian Shand for this trick.

Last Updated on Saturday, 24 April 2010 21:38
 

Year 2038 Bug News : January 2009 - Mailing List

E-mail Print PDF

News: January 2009:

 

Please join the Mailing List for discussion about the 2038 bug.

Last Updated on Saturday, 24 April 2010 21:38
 

Code Citation

E-mail Print PDF

Installed the CodeCiation plugin for Joomla.

This plugin will allow you to display code in a more readable format.

See the FAQ for usage examples.

Alternatively within the editor, under "Styles" you can use the "code"  option. This however appears to sometimes displays incorrectly and should be avoided except when using short, single lines of code.

Last Updated on Saturday, 24 April 2010 21:38
 



Users Online

None

Polls

Year 2038 Bug