From 60f7cd9ffed827627ae913f066c72ec3808552df Mon Sep 17 00:00:00 2001 From: Calvin Huang Date: Mon, 24 Jun 2024 11:46:08 -0700 Subject: [PATCH] save sso cache token expiresAt in UTC If the expiresAt field is saved with time zone (e.g. 2024-06-10T15:00:06-08:00) it will fail to load in certain SDKs such as the rust AWS SDK. To avoid this, ensure that it is always saved as a UTC format. --- credentials/ssocreds/sso_cached_token.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/credentials/ssocreds/sso_cached_token.go b/credentials/ssocreds/sso_cached_token.go index 3b97e6dd406..46ae2f92310 100644 --- a/credentials/ssocreds/sso_cached_token.go +++ b/credentials/ssocreds/sso_cached_token.go @@ -225,7 +225,7 @@ func (r *rfc3339) UnmarshalJSON(bytes []byte) (err error) { } func (r *rfc3339) MarshalJSON() ([]byte, error) { - value := time.Time(*r).Format(time.RFC3339) + value := time.Time(*r).UTC().Format(time.RFC3339) // Use JSON unmarshal to unescape the quoted value making use of JSON's // quoting rules.