Y2K38at 2010-08-25 in Further reading by friebe (0 comments) In a recent Sitepoint article, the author talks about problems with PHP's strtotime() function, which can be basically summed up to this: $ xp -e 'Console::writeLine(date("l d F Y H:i", strtotime("2040-02-01")));'The problem is the internal representation of dates, which will overflow and thus cause strtotime() to yield an incorrect value.The XP Framework's util.Date class, being based on PHP's DateTime class, will not exhibit this problem, regardless of whether the system is 32-bit or 64-bit. $d= new Date('2040-02-01');See also http://en.wikipedia.org/wiki/Year_2038_problem and - with a humouristic take: http://xkcd.com/607/ |
|