js 时间戳转格式化时间

mac2024-04-07  38

时间戳毫秒转标准时间 function format(value){ var date = new Date(parseInt(value)+ 8 * 3600 * 1000); // 增加8小时,这个不用管,直接复制粘贴用 return date.toJSON().substr(0, 19).replace('T', ' ');// 返回 样式为 2019-10-30 15:16:39 }

 

最新回复(0)