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" 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()] }) -