Thank you @Daniel F. That part of the code looks like this:
$date_tmp = new DateTime();
$date_tmp->modify('-24 hours');
//$formattedDate = $date_tmp->format('Y-m-d\TH:i:s\Z');
$formattedDate = $date_tmp->format('Y-m-d');
$data2 = array(
"status" => "published",
"category" => $cat_id,
"author" => $author,
"fields" => $fields2,
"image" => $zzz_image,
"date" => $formattedDate,
"hidden" => 1,
);
$curl2 = curl_init( $communityUrl . 'cms/records/7' );
You will notice there are 2 formattedDate variations, one is commented out. Neither one worked for me.