mirror of
https://git.asonix.dog/asonix/http-signature-normalization.git
synced 2024-11-25 10:51:01 +00:00
Change timestamp parsing
This commit is contained in:
parent
09f189c1f4
commit
aa95ef20d4
1 changed files with 2 additions and 1 deletions
|
@ -287,7 +287,8 @@ fn parse_time(
|
||||||
key: &'static str,
|
key: &'static str,
|
||||||
) -> Result<Option<DateTime<Utc>>, ParseSignatureError> {
|
) -> Result<Option<DateTime<Utc>>, ParseSignatureError> {
|
||||||
let r = hm.remove(key).map(|s| {
|
let r = hm.remove(key).map(|s| {
|
||||||
Utc.datetime_from_str(&s, "%s")
|
s.parse()
|
||||||
|
.map(|timestamp| Utc.timestamp(timestamp, 0))
|
||||||
.map_err(|_| ParseSignatureError(key))
|
.map_err(|_| ParseSignatureError(key))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue