You'd need to test against different formats to see which was the right one to use. What's the context of the data you have here? Is it something like an email message header, for example? Or data obtained from the internet? Do you control the source? Can your app always be assumed to have connectivity?
If the data is coming from a database, for example, you can get the SQL query to calculate a timestamp (syntax may differ, this works for MySQL)
SELECT appointmentDate, UNIX_TIMESTAMP(appointmentDate) AS apptTS FROM appointments
If the data is in a well-defined header (for example, the Date: header of an email message), you should be able to narrow it down to just a few formats to try - check the relevant RFCs to see what's allowable.
If you know you'll have connectivity, and latency isn't an issue, and you have a server with PHP, you could also let it do the work, by POSTing to a script like
date_default_timezone_set(
$unixtime = strtotime($_REQUEST[
$results = array(
print json_encode($results);
and then handling the JSON result. You could, perhaps, combine a selection - check in your code for the most common formats that you come across in your data, and if you find a date string that you can't handle, throw it at the webservice, which can also log the request, for you to work out the format and add it to the next version of the app.