export function timestampToTime(timestamp) {
        let date = new Date(timestamp);
        let year = date.getFullYear();
        let month = ("0" + (date.getMonth() + 1)).slice(-2);
        let day = ("0" + date.getDate()).slice(-2);
        let hour = ("0" + date.getHours()).slice(-2);
        let minute = ("0" + date.getMinutes()).slice(-2);
        let second = ("0" + date.getSeconds()).slice(-2);
        let formattedTime = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
        return formattedTime;
     }
     export function timescount(timestamp) {
      var date = new Date(timestamp*1000);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
      console.log(date);
       let year = date.getFullYear();
       let month = ("0" + (date.getMonth() + 1)).slice(-2);
       let day = ("0" + date.getDate()).slice(-2);
       let hour = ("0" + date.getHours()).slice(-2);
       let minute = ("0" + date.getMinutes()).slice(-2);
       let second = ("0" + date.getSeconds()).slice(-2);
       let dTime = year + "-" + month + "-" + day + " " + hour + ":" + minute + ":" + second;
        return dTime;
    }
//     timestampToTime(1403058804);
//     console.log(timestampToTime(1403058804));//2014-06-18 10:33:24
//      }
