From 826a0bdf80b53b95837c794442dd2ceda7cdb6c8 Mon Sep 17 00:00:00 2001 From: Milan Pavlik Date: Mon, 25 Jul 2022 12:46:21 +0000 Subject: [PATCH] [usage] Fix conversion of from and to pb.Timestamp --- components/server/ee/src/workspace/gitpod-server-impl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/server/ee/src/workspace/gitpod-server-impl.ts b/components/server/ee/src/workspace/gitpod-server-impl.ts index 126c631dcb11d0..d516faf328141b 100644 --- a/components/server/ee/src/workspace/gitpod-server-impl.ts +++ b/components/server/ee/src/workspace/gitpod-server-impl.ts @@ -2110,10 +2110,10 @@ export class GitpodServerEEImpl extends GitpodServerImpl { await this.guardCostCenterAccess(ctx, user.id, attributionId, "get"); if (from) { - timestampFrom = new Timestamp().setSeconds(from); + timestampFrom = Timestamp.fromDate(new Date(from)); } if (to) { - timestampTo = new Timestamp().setSeconds(to); + timestampTo = Timestamp.fromDate(new Date(to)); } const usageClient = this.usageServiceClientProvider.getDefault(); const response = await usageClient.listBilledUsage(ctx, attributionId, timestampFrom, timestampTo);