/**
* 获取当前时间字符串
* @returns {string}
* @constructor
*/
function GetCurrentTimeStr() {
var currentDate = new Date();
var year = currentDate.getFullYear().toString();
var month = (currentDate.getMonth() + 1).toString();
if (month.length === 1){
month = "0" + month;
}
var date = currentDate.getDate().toString();
if (date.length === 1){
date = "0" + date;
}
var hour = currentDate.getHours().toString();
if (hour.length === 1){
hour = "0" + hour;
}
var minute = currentDate.getMinutes().toString();
if (minute.length === 1){
minute = "0" + minute;
}
var second = currentDate.getSeconds().toString();
if (second.length === 1){
second = "0" + second;
}
return year+"-"+month+"-"+date+" " + hour+":"+minute+":"+second;
}