Skip to content

Commit

Permalink
Constrain ISO8601 date to seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
fireflycons committed Jan 8, 2020
1 parent 29bd4d8 commit f785850
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion aws-toolbox/Public/IAM/Get-ATIAMSessionCredentials.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function Get-ATIAMSessionCredentials
AccessKeyId = $cred.AccessKey
SecretAccessKey = $cred.SecretKey
SessionToken = $cred.Token
Expiration = $cred.Expires.ToString('s')
Expiration = $cred.Expires.ToString('s').SubString(0, 19)
} |
ConvertTo-Json
}
Expand Down
2 changes: 1 addition & 1 deletion tests/aws-toolbox.Public.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ InModuleScope -Module $ModuleName {

It 'Should yield expected expiry' {

$result.Expiration | Should Be $expectedExpiry.ToString('s')
$result.Expiration | Should Be $expectedExpiry.ToString('s').SubString(0, 19)
}
}
}
Expand Down

0 comments on commit f785850

Please sign in to comment.