Change timestamp parsing

This commit is contained in:
asonix 2020-07-24 17:48:00 -05:00
parent 09f189c1f4
commit aa95ef20d4

View file

@ -287,7 +287,8 @@ fn parse_time(
key: &'static str,
) -> Result<Option<DateTime<Utc>>, 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))
});