$user_timezone_name = date_default_timezone_name(TRUE);
$user_timezone = date_default_timezone(TRUE);
// Convert the user entered date into a PHP 5 DateTime object
$local_date = new DateTime($text_date);
// Reformat the user entered date into an ISO date that date_make_date() will accept
$iso_date_string = date_format_date($local_date, 'custom', 'Y-m-d\TH:i:s');
// Create a DateTime object with the user's timezone info
$utc_date = date_make_date($iso_date_string, $user_timezone_name, DATE_DATETIME);
// Change the timezone to UTC
date_timezone_set($utc_date, timezone_open('UTC'));
// Format the UTC version of the DateTime for use in node->save()
$utc_date_string = date_format_date($utc_date, 'custom', 'Y-m-d\TH:i:s');
return $utc_date_string;