Skip to content
This repository has been archived by the owner on Nov 15, 2018. It is now read-only.

Commit

Permalink
fix(*): 修复时间解析不正确的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
mutoe committed Oct 30, 2018
1 parent e21e1d1 commit 7839d6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/filters.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const time2tips = date => {
// match 2018/10/17 01:48:52"
if (date.match(/^\d{4}\/\d{2}\/\d{2} \d{2}:\d{2}:\d{2}$/)) {
// 如果匹配到服务器返回的时间是非标准格式的祖鲁时间,需要进行本地化
date = +new Date(date) + timeOffset;
date = +new Date(date) - timeOffset;
}
}
const time = new Date(date);
Expand Down

0 comments on commit 7839d6a

Please sign in to comment.