The PDO::exec statement returns an integer to indicate the number of rows that were affected. So in your particular case, as the SomeKittens indicates, if 0 rows were affected, then your error code would be triggered.
However, if you are concerned as to whether your query worked, your better action may be to use PDO::query (in terms of your code ($returnObj = $connect->query($sql3) instead of PDO::exec.
The $returnObj can then be checked to see if there was an error in the SQL execution, and you can then troubleshoot your SQL query because it will tell you what the error was and where it was located.
Your best bet to do this would be:
//set PDO to throw an error so you can wrap the query in a try / catch block.
$connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql3 = "update news set date='$time' where id='2'";
try {
$returnObj = $connect->query($sql3);
} catch (PDOException $e) {
print_r($returnOjb->errorInfo());
$error = $returnObj->errorInfo();
die ("Error: (".$error[0].':'.$error[1].') '.$error[2]);
}