utc 2018-03-07T16:00:00.000Z 格式转换2018-03-08 00:00
// UTC 转指定格式日期
export function utcTransform(datas) {
let date = new Date(datas)
let Y = date.getFullYear().toString();
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
//日
let D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate();
//时
let h = date.getHours() < 10 ? '0' + date.getHours() : date.getHours();
//分
let m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes();
//秒
let s = date.getSeconds();
return Y + '-' + M + '-' + D + ' ' + h + ":" + m
}
console.log(utcTransform("2018-03-07T16:00:00.000Z"));
//2018-03-08 00:00