获取当前时间

js:

var h=date.toLocaleString('chinese'{hour12:false}).replace(/[\/]/g, "-")

意为:获取当前时间 , 24小时制 ,将默认的斜杠换位短横线