Am saving to a mysql table using:
$query = mysql_query("INSERT INTO test SET postit='$postit',postdate=NOW()");
I’m then trying to display it using:
echo "<li>" . date("D, d M y H:i:s O",$row['timestamp']) . " - " . $row['postit'] . "</li>";
It’s saving the correct time in the database, however it renders:
Thu, 01 Jan 70 01:00:00 +0100
Anyone point out the stupidity?
The PHP date() function uses a Unix timestamp as the second variable in the function. What you are passing to the function is a MySQL time stamp. Try using: