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


##########
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:
   @BurntSushi This is actually:
   
   ```rust
   let dt = jiff::SignedDuration::try_from(d).unwrap()
   jiff::Timestamp::from_duration(dt).unwrap();
   ```
   
   I wonder if jiff would provide a method to create Timestamp 
`from_std_duration`, or just leave it to users wrapping as above if needed.



-- 
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