时间转换之格林时间转普通时间

/*

* 时间转换

* 格林时间转普通时间

* */

GMTToStr(time){

    let date = new Date(time)

    let Str=date.getFullYear() + '-' +

        (date.getMonth() + 1) + '-' +

        date.getDate() + ' ' +

        date.getHours() + ':' +

        date.getMinutes() + ':' +

        date.getSeconds()

    return Str

}

猜你喜欢

转载自blog.csdn.net/qq_27751965/article/details/100945362