fix Time call

This commit is contained in:
Timi
2026-10-21 01:02:38 +08:00
parent 77f061ef96
commit 0a283bf8e9
27 changed files with 59 additions and 59 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ export function buildPresetDateRange(type: DateFilterPreset, now = new Date()):
const begin = new Date(end);
begin.setDate(begin.getDate() - (type === "last7" ? 6 : 29));
begin.setHours(0, 0, 0, 0);
return [Time.formatDateTime(begin), Time.formatDateTime(end)];
return [Time.toDateTime(begin), Time.toDateTime(end)];
}
const date = getDateStart(now);
@@ -91,7 +91,7 @@ export function parseDateTime(value: string, isEnd: boolean): Date {
}
function buildDayRange(begin: Date, end: Date): DateTimeRange {
return [`${Time.formatDate(begin)} 00:00`, `${Time.formatDate(end)} 23:59`];
return [`${Time.toDate(begin)} 00:00`, `${Time.toDate(end)} 23:59`];
}
function getDateStart(date: Date): Date {