Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/unit/features/cost_budget.feature
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ Feature: Cost budget limiter module behavior

Scenario: computes weekly period boundary aligned to Monday UTC
When I compute period start for period "7d" at now 1770129000
Then the period start is 1769904000
Then the period start is 1769990400

Scenario: rejects unknown period in period start computation
When I compute period start for period "30m" at now 1770129000
Expand Down
2 changes: 1 addition & 1 deletion src/fairvisor/cost_budget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function _M.compute_period_start(period, now)
end

if period == "7d" then
return floor((now - 259200) / 604800) * 604800 + 259200
return floor((now - 345600) / 604800) * 604800 + 345600
end

return nil, "unknown period"
Expand Down
Loading