1
0
mirror of https://github.com/bspeice/dtparse synced 2025-07-03 14:54:57 -04:00

tzinfos isn't Vec<String>

This commit is contained in:
Bradlee Speice
2018-06-07 23:17:23 -04:00
parent 78b4d95b16
commit 3a17e14d42
3 changed files with 8 additions and 7 deletions

View File

@ -763,7 +763,7 @@ impl Parser {
fuzzy_with_tokens: bool,
default: Option<&NaiveDateTime>,
ignoretz: bool,
tzinfos: Vec<String>,
tzinfos: HashMap<String, i32>,
) -> Result<(NaiveDateTime, Option<FixedOffset>, Option<Vec<String>>), ParseError> {
let default_date = default.unwrap_or(&Local::now().naive_local()).date();
@ -1285,7 +1285,7 @@ fn ljust(s: &str, chars: usize, replace: char) -> String {
}
pub fn parse(timestr: &str) -> ParseResult<(NaiveDateTime, Option<FixedOffset>)> {
let res = Parser::default().parse(timestr, None, None, false, false, None, false, vec![])?;
let res = Parser::default().parse(timestr, None, None, false, false, None, false, HashMap::new())?;
Ok((res.0, res.1))
}