Skip to content

Commit

Permalink
Merge pull request #185 from llamahunter/fix-token-test-timestamp
Browse files Browse the repository at this point in the history
Fix UTC time conversion bug.
  • Loading branch information
k8s-ci-robot authored Jan 3, 2019
2 parents ce5c46a + 46efa80 commit 0eef0a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/token/token_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func assertSTSError(t *testing.T, err error) {

var (
now = time.Now()
timeStr = now.Format("20060102T150405Z")
timeStr = now.UTC().Format("20060102T150405Z")
validToken = toToken(validURL)
validURL = fmt.Sprintf("https://sts.amazonaws.com/?action=GetCallerIdentity&x-amz-signedheaders=x-k8s-aws-id&x-amz-expires=60&x-amz-date=%s", timeStr)
)
Expand Down

0 comments on commit 0eef0a4

Please sign in to comment.