Skip to content

fix: use release start timestamp for delta zip filename - #63

Open
maksimtech wants to merge 1 commit into
CVEProject:devfrom
maksimtech:fix/delta-filename-use-start-timestamp
Open

fix: use release start timestamp for delta zip filename#63
maksimtech wants to merge 1 commit into
CVEProject:devfrom
maksimtech:fix/delta-filename-use-start-timestamp

Conversation

@maksimtech

Copy link
Copy Markdown

Problem

The delta zip filename was derived from new Date() inside
DeltaCommand.run(), which captures the time when the function
executes rather than when the release started.

If processing crosses an hour boundary the filename ends up one hour
ahead of the release tag (e.g. tag cve_2026-01-29_0200Z contains
a file named 2026-01-29_delta_CVEs_at_0300Z.zip).

Fixes #124.

Fix

Replace new Date() with new Date(options.start) so the filename
always reflects the release start time:

// Before
const timestamp = new Date();

// After
const timestamp = new Date(options.start);

Notes

The --yesterday-all branch already handles this correctly using
startOfYesterday() — this fix brings the default branch in line
with the same approach.

This fix is equivalent to the approach in PR #130.

The timestamp for the delta filename was captured with new Date()
inside DeltaCommand.run(), which captures the time of execution
rather than the release start time.

If processing crosses an hour boundary, the filename ends up one
hour ahead of the release tag (e.g. tag cve_2026-01-29_0200Z
contains a file named 2026-01-29_delta_CVEs_at_0300Z.zip).

Fix: derive timestamp from options.start (the release start time)
instead of new Date() at execution time.

Fixes #124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant