Forum Moderators: coopster

Message Too Old, No Replies

php date flaw

         

andrewsmd

6:17 pm on Aug 26, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I was recently made aware of the "Y2K38" bug which is on our current install of php. Are there any hotfixes or suggestions to fix this?

Run this code

<?php
$date = '2040-02-01';
$format = 'l d F Y H:i';

$mydate1 = strtotime($date);
echo '<p>', date($format, $mydate1), '</p>';
?>

I get this
Wednesday 31 December 1969 18:00