time() is a PHP function*. NOW() is a MySQL function.
If you want the current date/time in a MySQL query:
$sql = "INSERT INTO `table_name` (`date_col`) VALUES (NOW())";
If you have a PHP timestamp you want to enter into the field:
$sql = "INSERT INTO `table_name` (`date_col`) VALUES ('".date('Y-m-d H:i:s', $time)."')";
* Actually, there is a MySQL TIME() function, but it has nothing to do with getting the current time.