javascript[es6]获取时间格式yyyy-MM-dd HH:ss:mm
function getDateYYYYMMddHHMMSS(){
const date = new Date();
const month = (date.getMonth() + 1).toString().padStart(2, '0');
const strDate = date.getDate().toString().padStart(2, '0');
const starHours = date.getHours().toString().padStart(2, '0');
const starMinutes = date.getMinutes().toString().padStart(2, '0');
const starSeconds = date.getSeconds().toString().padStart(2, '0');
return `${date.getFullYear()}-${month}-${strDate} ${starHours}:${starMinutes}:${starSeconds}`;
}