fix: interval should be 1d=24h (#1482) (#1483)

This commit is contained in:
zedongh 2022-08-09 12:22:55 +08:00 committed by GitHub
parent 8f9d0f2403
commit 9de99d1872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,11 +30,11 @@ const GetMinMax = (
minTime = minTimeAgo;
} else if (interval === '1day') {
// one day = 24*60(min)
const minTimeAgo = getMinAgo({ minutes: 26 * 60 }).getTime();
const minTimeAgo = getMinAgo({ minutes: 24 * 60 }).getTime();
minTime = minTimeAgo;
} else if (interval === '1week') {
// one week = one day * 7
const minTimeAgo = getMinAgo({ minutes: 26 * 60 * 7 }).getTime();
const minTimeAgo = getMinAgo({ minutes: 24 * 60 * 7 }).getTime();
minTime = minTimeAgo;
} else if (['4hr', '6hr'].includes(interval)) {
const h = parseInt(interval.replace('hr', ''), 10);