Skip to content

Commit 93e969e

Browse files
committed
std: un-ignore strptime test; fix bug introduced by 1a226f instead.
1 parent 2c870e4 commit 93e969e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libstd/time.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ priv fn do_strptime(s: &str, format: &str) -> Result<Tm, ~str> {
576576
match match_digits_in_range(s, pos, 1u, false, 1_i32, 7_i32) {
577577
Some(item) => {
578578
let (v, pos) = item;
579-
tm.tm_wday = v-1_i32;
579+
tm.tm_wday = if v == 7 { 0 } else { v };
580580
Ok(pos)
581581
}
582582
None => Err(~"Invalid day of week")
@@ -1025,7 +1025,6 @@ mod tests {
10251025
}
10261026

10271027
#[test]
1028-
#[ignore(reason = "randomred")]
10291028
fn test_strptime() {
10301029
os::setenv(~"TZ", ~"America/Los_Angeles");
10311030
tzset();

0 commit comments

Comments
 (0)