var input = "2009-07-15 00:00:00 - 2009-07-15 08:16:23";
input = input.split(" - ").map(function (date){
return Date.parse(date+"-0500")/1000;
}).join(" - ");
Demo
Date.parse docs
Note: This won't work on old browsers since I'm using Array.map, but I think you should easily be able to shim it.