export default {
  methods:{
    formatDatetime(inputTime){
        //如果为空值则返回空字符串
        if(!inputTime ){//&& typeof inputTime !== 'number'){
            return '';
        }
        var localTime = '';
        //获取毫秒数
        inputTime = new Date(inputTime).getTime();
        const offset = (new Date()).getTimezoneOffset();
        localTime = (new Date(inputTime - offset * 60000)).toISOString();
        localTime = localTime.substr(0, localTime.lastIndexOf('.'));
        localTime = localTime.replace('T', ' ');
        return localTime;
    }
  }
}
