satellite/satellitedb: fix ProjectAccounting project bandwidth calculation
Period end was calculated incorrectly as it was still in current month but should be the first day of next month. Change-Id: I37451d29a9b901b69e6c3c401b333c58b3376d61
This commit is contained in:
parent
1c3688f1d6
commit
aa7fd8c9cd
@ -150,7 +150,7 @@ func (db *ProjectAccounting) GetProjectBandwidth(ctx context.Context, projectID
|
||||
} else {
|
||||
expiredSince = time.Date(year, month, day-allocatedExpirationInDays, 0, 0, 0, 0, time.UTC)
|
||||
}
|
||||
periodEnd := time.Date(year, month+1, 0, 0, 0, 0, 0, time.UTC)
|
||||
periodEnd := time.Date(year, month+1, 1, 0, 0, 0, 0, time.UTC)
|
||||
|
||||
query := `WITH egress AS (
|
||||
SELECT
|
||||
|
Loading…
Reference in New Issue
Block a user