1
0
mirror of https://github.com/bspeice/dtparse synced 2024-12-22 12:28:08 -05:00

Give rust the same info as dateutil

This commit is contained in:
Bradlee Speice 2018-06-07 23:20:38 -04:00
parent 3a17e14d42
commit a00156780d

View File

@ -64,6 +64,15 @@ macro_rules! py_offset_secs {
}); });
} }
macro_rules! rs_tzinfo_map {
() => ({
let mut h = HashMap::new();
h.insert("BRST".to_owned(), -10800);
h
})
}
fn parse_and_assert( fn parse_and_assert(
py: Python, py: Python,
parser: &PyModule, parser: &PyModule,
@ -212,7 +221,7 @@ macro_rules! test_parse {
false, false,
Some(default_rsdate), Some(default_rsdate),
false, false,
HashMap::new() rs_tzinfo_map!()
); );
}; };
} }
@ -234,7 +243,7 @@ macro_rules! test_parse_yearfirst {
false, false,
Some(default_rsdate), Some(default_rsdate),
false, false,
HashMap::new() rs_tzinfo_map!()
); );
}; };
} }
@ -256,7 +265,7 @@ macro_rules! test_parse_dayfirst {
false, false,
Some(default_rsdate), Some(default_rsdate),
false, false,
HashMap::new() rs_tzinfo_map!()
); );
}; };
} }
@ -278,7 +287,7 @@ macro_rules! test_parse_ignoretz {
false, false,
Some(default_rsdate), Some(default_rsdate),
true, true,
HashMap::new() rs_tzinfo_map!()
); );
}; };
} }