
export function truncateCommitId(str) {
  if (str && str.length > 11) {
    return str.substring(0, 10)
  }else{
    return str
  }
}

// 秒数转2021-9-29 01:01
export function timeFormat(SecondsStr){
  const time = new Date(SecondsStr*1000);
  const hour = time.getHours()<10?"0".concat(time.getHours()):time.getHours();
  const minutes = time.getMinutes()<10?"0".concat(time.getMinutes()):time.getMinutes();
  return time.getFullYear()+"-"+(time.getMonth()+1)+"-"+time.getDate()+"  "+hour+":"+minutes;
}