From 267ef5b5130fed4b8d9848d0291f7631c566b838 Mon Sep 17 00:00:00 2001 From: Fine Date: Tue, 7 Feb 2023 15:07:12 +0800 Subject: [PATCH] fix: dates --- src/views/dashboard/Widget.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/dashboard/Widget.vue b/src/views/dashboard/Widget.vue index 8b55ad26..dac00ca8 100644 --- a/src/views/dashboard/Widget.vue +++ b/src/views/dashboard/Widget.vue @@ -89,10 +89,8 @@ limitations under the License. --> await queryMetrics(); } async function setDuration() { - const dates: Date[] = [ - getLocalTime(appStoreWithOut.utc, new Date(new Date().getTime() - config.value.auto)), - getLocalTime(appStoreWithOut.utc, new Date()), - ]; + const dates: Date[] = [new Date(new Date().getTime() - config.value.auto), new Date()]; + appStoreWithOut.setDuration(timeFormat(dates)); } async function setSelector() {