I guess your date is in an ISO 8601 like format of yyyy-mm-dd hh:mm:ss and should be interpreted as a local time. In that case, parse the string, convert it to a Date object and subtract it from now to get the difference in milliseconds. Divide by 1,000 to get the difference in seconds, e.g.
// Parse string in yyyy-mm-dd hh:mm:ss format
// Assume is a valid date and time in the system timezone
function parseString(s) {
var b = s.split(/\D+/);
return new Date(b[0], --b[1], b[2], b[3], b[4], b[5]);
}
// Get the difference between now and a provided date string
// in a format accepted by parseString
// If d is an invalid string, return NaN
// If the provided date is in the future, the returned value is +ve
function getTimeUntil(s) {
var d = parseString(s);
return d? (d - Date.now())/1000|0 : NaN;
}