From 9856c2b5e9e6722c3e4b40345fdc429ae3cb6992 Mon Sep 17 00:00:00 2001 From: zsnmwy <35299017+zsnmwy@users.noreply.github.com> Date: Wed, 10 May 2023 03:02:29 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20QueryWindow=20Range=20-=20LAST=5F1=5FDAY?= =?UTF-8?q?=20=E5=89=8D=E5=8F=B0=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4?= =?UTF-8?q?=E4=B8=8D=E5=87=86=E7=A1=AE=20#778?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/web/src/utils/rangeMap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/web/src/utils/rangeMap.ts b/pkg/web/src/utils/rangeMap.ts index b65f03f9e..fd9ad0d14 100644 --- a/pkg/web/src/utils/rangeMap.ts +++ b/pkg/web/src/utils/rangeMap.ts @@ -3,7 +3,7 @@ import dayjs from 'dayjs'; import { QueryWindow } from '../models'; export const rangeMap = { - [QueryWindow.LAST_1_DAY]: [dayjs().startOf('day'), dayjs()], + [QueryWindow.LAST_1_DAY]: [dayjs(+dayjs() - 3600 * 24 * 1000), dayjs()], [QueryWindow.LAST_7_DAY]: [dayjs().subtract(7, 'd').startOf('day'), dayjs()], [QueryWindow.LAST_30_DAY]: [dayjs().subtract(30, 'd').startOf('day'), dayjs()], };