$scope.getTimeString = function (longTimes){
var d = new Date (longTimes);
var result ="";
result += d.getFullYear();
result += "-";
result += d.getMonth();
result += "-";
result += d.getDay();
result += " ";
result += d.getHours();
result += ":";
result += d.getMinutes();
result += ":";
result += d.getSeconds();
return result;
};