From 3927a951e90bb32417633895b1151eb442d7e534 Mon Sep 17 00:00:00 2001 From: Nicolas Bigler Date: Tue, 19 Dec 2023 13:30:47 +0100 Subject: [PATCH] f Signed-off-by: Nicolas Bigler --- pkg/exoscale/dbaas.go | 4 ++-- pkg/exoscale/objectstorage.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/exoscale/dbaas.go b/pkg/exoscale/dbaas.go index 51f01bf..7767081 100644 --- a/pkg/exoscale/dbaas.go +++ b/pkg/exoscale/dbaas.go @@ -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 { diff --git a/pkg/exoscale/objectstorage.go b/pkg/exoscale/objectstorage.go index cf97099..10a6179 100644 --- a/pkg/exoscale/objectstorage.go +++ b/pkg/exoscale/objectstorage.go @@ -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 {