From a3b6f2981ef57febba6dd3b3aac5d481c5498c7c Mon Sep 17 00:00:00 2001 From: kevinpoitra Date: Tue, 7 Jan 2020 22:05:28 -0600 Subject: [PATCH] Correctly parse C's asctime time format using time 0.2's new format patterns --- actix-http/src/time_parser.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actix-http/src/time_parser.rs b/actix-http/src/time_parser.rs index 3616d2a17..ba20a1204 100644 --- a/actix-http/src/time_parser.rs +++ b/actix-http/src/time_parser.rs @@ -38,5 +38,5 @@ fn try_parse_rfc_850(time: &str) -> Option { /// Attempt to parse a `time` string using ANSI C's `asctime` format. fn try_parse_asctime(time: &str) -> Option { - PrimitiveDateTime::parse(time, "%c").ok() + PrimitiveDateTime::parse(time, "%a %b %_d %H:%M:%S %Y").ok() }