Skip to content

Commit

Permalink
修复更新频率检测的一处错误,为了适应多时区,将更新频率定为每整点一次
Browse files Browse the repository at this point in the history
  • Loading branch information
iwyvi committed Jul 30, 2018
1 parent 6e8e3d4 commit 16ef1a8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/utils/updateSchedule.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@
export function judgeUpdateStatus(updatedAt) {
const now = Date.now()
const updatedDate = new Date(updatedAt)
if (updatedDate.getHours % 2 === 0) {
if (now - ((60 * 2 - updatedDate.getMinutes()) * 60 * 1000) > updatedAt) {
return true
}
return false
}
if (now - ((60 - updatedDate.getMinutes()) * 60 * 1000) > updatedAt) {
return true
}
Expand Down

0 comments on commit 16ef1a8

Please sign in to comment.