Time Format distal 2020-02-11T12: 24: 18.000 + 0000 is converted into a normal format

Tools for the direct conversion of the front end of the original time format:

function renderTime(date) {
  var dateee = new Date(date).toJSON();
  return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, ' ').replace(/\.[\d]{3}Z/, '') 
}

Transformation success:

2020-02-11 12:24:18
Published 45 original articles · won praise 1 · views 1070

Guess you like

Origin blog.csdn.net/lqq404270201/article/details/104358933