js13位时间戳转换,10位时间戳转换

13位转换:   var d = new Date( 时间戳 );       注意时间戳的单位是毫秒。

10位转换: Math.round(new Date() / 1000)

this.temp.createTime = new Date(this.temp.createTime * 1000);
createTime:(new Date()).toISOString().slice(0,10)




                                    
原文地址:https://www.cnblogs.com/hzcya1995/p/13300646.html