From d45341eabf14957538ea86bf9815f6897f2ab778 Mon Sep 17 00:00:00 2001 From: Jakob Gillich Date: Thu, 13 Nov 2014 19:33:42 +0100 Subject: [PATCH 1/2] add time dependency --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index e5536efd21..4d179a0bd1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -30,3 +30,6 @@ git = "https://github.com/chris-morgan/rust-http" [dependencies.cookie] git = "https://github.com/alexcrichton/cookie-rs" + +[dependencies.time] +git = "https://github.com/rust-lang/time" From b6e784cf5ef6fd65aa83e9f8c6c54605c0825755 Mon Sep 17 00:00:00 2001 From: Jakob Gillich Date: Thu, 13 Nov 2014 19:34:07 +0100 Subject: [PATCH 2/2] tm_gmtoff has been renamed to tm_utcoff --- src/header/common/date.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/header/common/date.rs b/src/header/common/date.rs index dc4d59cb58..5a4038301c 100644 --- a/src/header/common/date.rs +++ b/src/header/common/date.rs @@ -30,7 +30,7 @@ impl fmt::Show for Date { let Date(ref tm) = *self; // bummer that tm.strftime allocates a string. It would nice if it // returned a Show instead, since I don't need the String here - match tm.tm_gmtoff { + match tm.tm_utcoff { 0 => tm.rfc822().fmt(fmt), _ => tm.to_utc().rfc822().fmt(fmt) } @@ -72,4 +72,3 @@ impl FromStr for Date { bench_header!(imf_fixdate, Date, { vec![b"Sun, 07 Nov 1994 08:48:37 GMT".to_vec()] }) bench_header!(rfc_850, Date, { vec![b"Sunday, 06-Nov-94 08:49:37 GMT".to_vec()] }) bench_header!(asctime, Date, { vec![b"Sun Nov 6 08:49:37 1994".to_vec()] }) -