How to convert gmt time to UTC using php [closed]

I am working on Php and right now i am getting “start_date” from database and i am trying to convert datetime into “UTC” time , But how can i do this ? I tried with following code

$tymEnd2 = $_POST['end_time']; // dynamic time
$endTime2 = date('h:i A', strtotime($tymEnd2));
$dateEnd2 = $_POST['end_date'];
$nft_end_data3 = $dateEnd2.' '.$endTime2;
$dateStr3 = $nft_end_data3;
$timestamp_end_utc = DateTime::createFromFormat('Y-m-d h:i A', $dateStr3)->getTimestamp();