aboutsummaryrefslogtreecommitdiff
path: root/src/api/signature/streaming.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2024-02-07 14:48:27 +0100
committerAlex Auvolat <alex@adnab.me>2024-02-07 14:48:27 +0100
commita31d1bd4969654e6041070b6e80ae025925808c2 (patch)
treebc919a231b47f8bc454a3d058bd15b4107f89154 /src/api/signature/streaming.rs
parente524e7a30d4d81c84f1c110017ad972dc5617bf6 (diff)
downloadgarage-a31d1bd4969654e6041070b6e80ae025925808c2.tar.gz
garage-a31d1bd4969654e6041070b6e80ae025925808c2.zip
[dep-upgrade-202402] fix obsolete DateTime::from_utc calls
Diffstat (limited to 'src/api/signature/streaming.rs')
-rw-r--r--src/api/signature/streaming.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api/signature/streaming.rs b/src/api/signature/streaming.rs
index 8fb0c4ef..ea5a64e2 100644
--- a/src/api/signature/streaming.rs
+++ b/src/api/signature/streaming.rs
@@ -1,6 +1,6 @@
use std::pin::Pin;
-use chrono::{DateTime, NaiveDateTime, Utc};
+use chrono::{DateTime, NaiveDateTime, TimeZone, Utc};
use futures::prelude::*;
use futures::task;
use garage_model::key_table::Key;
@@ -44,7 +44,7 @@ pub fn parse_streaming_body(
.to_str()?;
let date: NaiveDateTime = NaiveDateTime::parse_from_str(date, LONG_DATETIME)
.ok_or_bad_request("Invalid date")?;
- let date: DateTime<Utc> = DateTime::from_utc(date, Utc);
+ let date: DateTime<Utc> = Utc.from_utc_datetime(&date);
let scope = compute_scope(&date, region, service);
let signing_hmac = crate::signature::signing_hmac(&date, secret_key, region, service)