feat: 优化日志查初始时间

This commit is contained in:
CalciumIon committed 2024-08-01 17:36:26 +08:00
1 parent d59bf0b0be
commit 78ffd8d294
2 files changed
+10 -4

No files matched your search

+6
View File
@@ -140,6 +140,12 @@ export function removeTrailingSlash(url) {
}
}
export function getTodayStartTimestamp() {
var now = new Date();
now.setHours(0, 0, 0, 0);
return Math.floor(now.getTime() / 1000);
}
export function timestamp2string(timestamp) {
let date = new Date(timestamp * 1000);
let year = date.getFullYear().toString();