mirror of
https://github.com/bspeice/dtparse
synced 2024-12-22 04:18:09 -05:00
Bugfix
This commit is contained in:
parent
d5e0a5d46a
commit
d7ff381d7f
@ -84,10 +84,7 @@ use chrono::Local;
|
||||
use chrono::NaiveDate;
|
||||
use chrono::NaiveDateTime;
|
||||
use chrono::NaiveTime;
|
||||
use chrono::Offset;
|
||||
use chrono::TimeZone;
|
||||
use chrono::Timelike;
|
||||
use chrono_tz::Tz;
|
||||
use num_traits::cast::ToPrimitive;
|
||||
use rust_decimal::Decimal;
|
||||
use rust_decimal::Error as DecimalError;
|
||||
@ -976,7 +973,7 @@ impl Parser {
|
||||
Ok(Some(FixedOffset::east(
|
||||
*tzinfos.get(res.tzname.as_ref().unwrap()).unwrap(),
|
||||
)))
|
||||
} else if res.tzname.is_some() {
|
||||
} else if let Some(tzname) = res.tzname.as_ref() {
|
||||
println!("tzname {} identified but not understood.", tzname);
|
||||
Ok(None)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user