对于标准时间转换为日常年月日时分秒标准格式补零的
function getDateString(date) {
var year = date.getFullYear().toString().padStart(4, "0");
var month = (date.getMonth() + 1).toString().padStart(2, "0");
var day = date.getDate().toString().padStart(2, "0");
var hour = date.getHours().toString().padStart(2, "0");
var minute = date.getMinutes().toString().padStart(2, "0");
var second = date.getSeconds().toString().padStart(2, "0");
return `${year}- ${month}-${day} ${hour}:${minute}:${second}`;
}