From aa95ef20d4efa1012c80da8a90fb77cf9ba1b7d3 Mon Sep 17 00:00:00 2001 From: asonix Date: Fri, 24 Jul 2020 17:48:00 -0500 Subject: [PATCH] Change timestamp parsing --- src/verify.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/verify.rs b/src/verify.rs index 00c882c..1a2dfd8 100644 --- a/src/verify.rs +++ b/src/verify.rs @@ -287,7 +287,8 @@ fn parse_time( key: &'static str, ) -> Result>, ParseSignatureError> { 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)) });