From 3ff51b34f58e0bde7946af59e1215b7d3db65a95 Mon Sep 17 00:00:00 2001 From: Ryan Kohler Date: Thu, 11 Mar 2021 07:12:05 -0800 Subject: [PATCH] google: Make sure time is always in UTC --- google/internal/externalaccount/basecredentials.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/google/internal/externalaccount/basecredentials.go b/google/internal/externalaccount/basecredentials.go index 1b87c09..1a6e93c 100644 --- a/google/internal/externalaccount/basecredentials.go +++ b/google/internal/externalaccount/basecredentials.go @@ -14,7 +14,9 @@ import ( ) // now aliases time.Now for testing -var now = time.Now +var now = func() time.Time { + return time.Now().UTC() +} // Config stores the configuration for fetching tokens with external credentials. type Config struct {