BurntSushi commented on code in PR #634:
URL: https://github.com/apache/opendal-reqsign/pull/634#discussion_r2370747885


##########
services/azure-storage/src/provide_credential/azure_pipelines.rs:
##########
@@ -238,7 +238,7 @@ impl ProvideCredential for AzurePipelinesCredentialProvider 
{
             .and_then(|t| {
                 t.duration_since(std::time::UNIX_EPOCH)
                     .ok()
-                    .map(|d| chrono::DateTime::from_timestamp(d.as_secs() as 
i64, 0).unwrap())
+                    .map(|d| jiff::Timestamp::new(d.as_secs() as i64, 
0).unwrap())

Review Comment:
   It looks like this entire block could just be this?
   
   ```rust
   let expires_in = std::time::Duration::from_secs(token_response.expires_in);
   let expires_on = jiff::Timestamp::now().checked_add(expires_in);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to