about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2013-01-22 21:41:56 -0800
committerGraydon Hoare <graydon@mozilla.com>2013-01-22 21:42:24 -0800
commit93e969e356dc8908a7eeef675269149f81a10eed (patch)
tree56f7e2e44c6d0ef99e9f23b0ae898a4ad623c815 /src/libstd
parent2c870e40744b873bf3205af7b2057cf4f76c3d1f (diff)
downloadrust-93e969e356dc8908a7eeef675269149f81a10eed.tar.gz
rust-93e969e356dc8908a7eeef675269149f81a10eed.zip
std: un-ignore strptime test; fix bug introduced by 1a226f instead.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/time.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstd/time.rs b/src/libstd/time.rs
index 520b7678848..61202401359 100644
--- a/src/libstd/time.rs
+++ b/src/libstd/time.rs
@@ -576,7 +576,7 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
             match match_digits_in_range(s, pos, 1u, false, 1_i32, 7_i32) {
               Some(item) => {
                 let (v, pos) = item;
-                tm.tm_wday = v-1_i32;
+                tm.tm_wday = if v == 7 { 0 } else { v };
                 Ok(pos)
               }
               None => Err(~"Invalid day of week")
@@ -1025,7 +1025,6 @@ mod tests {
     }
 
     #[test]
-    #[ignore(reason = "randomred")]
     fn test_strptime() {
         os::setenv(~"TZ", ~"America/Los_Angeles");
         tzset();