pkvasan
2007-06-25 07:15:01 UTC
I am using date & strtotime function in my codes
I had given input as "12-02-2006" in php ver 5.2.1 the output produced is 12-02-2006 == Sunday 12th of February 2006 12:00:00 AM
With the same input if i test in php ver 4.3.1.1 the output produced is 12-02-2006 == Saturday 29th of July 2017 12:00:00 AM
Can any one help me what is problem here is it my code is mentioned below
$str = '12-02-2006';
if (($timestamp = strtotime($str)) === false) {
echo "The string ($str) is in valid";
} else {
echo "$str == " . date('l dS \o\f F Y h:i:s A', $timestamp);
}
?>
Thanks & Regards
PKVASAN