public function convertToUTC($timestamp, $timezone, $format = 'Y-m-d H:i:s') { $date = new DateTime($timestamp, new DateTimeZone($timezone)); $date->setTimezone(new DateTimeZone('UTC')); return $date->format($format); }