Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas Bigler <[email protected]>
  • Loading branch information
TheBigLee committed Dec 19, 2023
1 parent 2b4edfa commit 3927a95
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/exoscale/dbaas.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ func (ds *DBaaS) AggregateDBaaS(ctx context.Context, exoscaleDBaaS []*egoscale.D
}

now := time.Now().In(location)
billingDateStart := time.Date(now.Year(), now.Month(), now.Day(), now.Hour(), 0, 0, 0, now.Location())
billingDateEnd := time.Date(now.Year(), now.Month(), now.Day(), now.Hour()+1, 0, 0, 0, now.Location())
billingDateStart := time.Date(now.Year(), now.Month(), now.Day(), now.Hour(), 0, 0, 0, now.Location()).In(time.UTC)
billingDateEnd := time.Date(now.Year(), now.Month(), now.Day(), now.Hour()+1, 0, 0, 0, now.Location()).In(time.UTC)

records := make([]odoo.OdooMeteredBillingRecord, 0)
for _, dbaasDetail := range dbaasDetails {
Expand Down
2 changes: 1 addition & 1 deletion pkg/exoscale/objectstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ func (o *ObjectStorage) getOdooMeteredBillingRecords(ctx context.Context, sosBuc
}

now := time.Now().In(location)
billingDate := time.Date(now.Year(), now.Month(), now.Day()-1, 0, 0, 0, 0, now.Location())
billingDate := time.Date(now.Year(), now.Month(), now.Day()-1, 0, 0, 0, 0, now.Location()).In(time.UTC)

aggregatedBuckets := make([]odoo.OdooMeteredBillingRecord, 0)
for _, bucketDetail := range bucketDetails {
Expand Down

0 comments on commit 3927a95

Please sign in to comment.