yeah i just tested that code on a mysql db and it works for me. can you put a or die(mysql_error()) on your query and see what it says. show us your insert statement. heres my example one i used just for testing not to make code secure and nice etc...
<?php
$conn = mysql_connect("***","***","***");
mysql_selectdb("testsql");
$timestampInSeconds = $_SERVER['REQUEST_TIME'];
$mySqlDateTime= date("Y-m-d H:i:s", $timestampInSeconds);
mysql_query("insert into hello (`test1`)values('$mySqlDateTime')");
$q = mysql_query("select * from hello");
while($row = mysql_fetch_array($q,MYSQL_ASSOC)){
echo $row['test1']."<br>";
}
?>