diff --git a/src/App.vue b/src/App.vue index f9d814b..b34a124 100644 --- a/src/App.vue +++ b/src/App.vue @@ -19,7 +19,7 @@ const isSetupComplete = ref(false); const savePath = ref(""); const dbPath = ref(""); const isPaused = ref(false); -const currentDate = ref(new Date().toLocaleDateString('sv')); +const currentDate = ref(new Date(Date.now() - TIME_OFFSET_MINUTES * 60000).toLocaleDateString('sv')); const timelineImages = ref([]); const selectedImage = ref(null); const lockedImage = ref(null); @@ -59,7 +59,8 @@ const currentLogicalMinute = ref(-1); let currentMinuteInterval: number | null = null; const updateCurrentMinute = () => { const now = new Date(); - if (now.toLocaleDateString('sv') === currentDate.value) { + const logicalDateStr = new Date(now.getTime() - TIME_OFFSET_MINUTES * 60000).toLocaleDateString('sv'); + if (logicalDateStr === currentDate.value) { const m = now.getHours() * 60 + now.getMinutes(); currentLogicalMinute.value = (m < TIME_OFFSET_MINUTES ? m + 1440 : m) - TIME_OFFSET_MINUTES; } else { @@ -520,7 +521,7 @@ const handleExport = async () => {
-
+

瞬影 - 时间记录