-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
bugSomething isn't workingSomething isn't working
Description
In src/utils/_utils.ts:65-69:
export function waybackTimestampToISO(timestamp: string): string {
return timestamp.length >= 14
? \`\${timestamp.slice(0,4)}-...\`
: new Date().toISOString()
}When the timestamp is shorter than 14 characters (or empty), the function returns today's date. This is used by both the Wayback and CommonCrawl providers to set ArchivedPage.timestamp.
The problem: an archive from 2015 with a truncated timestamp silently gets today's date. The caller has no way to tell the timestamp was fabricated vs. real. For a library whose job is returning historical data, this quietly corrupts the one field users depend on most.
Options worth considering:
- Return a distinguishable sentinel (empty string, or an explicit
nullwith a type change) - Pad shorter timestamps with zeros so
20220101→2022-01-01T00:00:00Zinstead of 2026 - Log a warning via consola so the caller at least sees it
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working