Skip to content

Commit

Permalink
Merge pull request #39 from cboudereau/fix/issue37
Browse files Browse the repository at this point in the history
fix duration microseconds convertion
  • Loading branch information
cboudereau committed May 2, 2024
2 parents 608cbf8 + dc345ef commit 0bf6a13
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gcp/oauth2/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ where
D: Deserializer<'de>,
{
let expires_in: i64 = Deserialize::deserialize(deserializer)?;
Ok(Utc::now() + chrono::Duration::microseconds(expires_in * 1000_1000))
Ok(Utc::now() + chrono::Duration::microseconds(expires_in * ONE_SECOND_TO_MICROSECONDS))
}

impl Display for Token {
Expand Down

0 comments on commit 0bf6a13

Please sign in to comment.