js将"2018-08-30T08:33:20.000+0000"这种格式的时间转化为正常格式2018-08-30 16:33:20

简单粗暴 直接上代码!

 //时间格式化函数
      renderTime(date){
        var dateee = new Date(date).toJSON();
        return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '')
      },

猜你喜欢

转载自blog.csdn.net/qq_40683441/article/details/89283037
33