in Javascript you can directly pass the string to Date object constructor, like
var date = new Date('2009-07-15 00:00:00'.split(' ').join('T'))
that will give you date object and to get timestamp from it you can do
date.getTime() / 1000
dividing by 1000 because getTime
will give timestamps in milliseconds
Working Demo
NOTE:
Firefox is not able to parse the given date time format, so we need to convert it into proper format first, for that we just need to replace space between date and time component with 'T' that will make it a valid ISO 8601 format and firefox will be able to parse it
Reference:
Date.parse in MDN
ISO 8601 Date Format
Same question asked here