@ddtcorex/dsh-maestro-memory 1.1.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -99,12 +99,15 @@ export function renderSnapshot(
99
99
 
100
100
  // Recent daily slot (512B) — last 2 days' newest entries
101
101
  // Keeps recent context without exceeding cap; full logs remain query-only.
102
+ // Use local calendar (matching store.todayStamp) to avoid UTC/local drift near midnight.
102
103
  try {
103
104
  const recentDaily: string[] = []
104
105
  for (let i = 0; i < 2; i++) {
105
106
  const d = new Date()
106
107
  d.setDate(d.getDate() - i)
107
- const ds = d.toISOString().slice(0, 10)
108
+ const mm = String(d.getMonth() + 1).padStart(2, '0')
109
+ const dd = String(d.getDate()).padStart(2, '0')
110
+ const ds = `${d.getFullYear()}-${mm}-${dd}`
108
111
  try {
109
112
  const list: string[] = store.list('daily', undefined, { date: ds } as any)
110
113
  if (list.length) recentDaily.push(list[list.length - 1])