Skip to content

Commit

Permalink
chore: handle breaking change in chrono-tz
Browse files Browse the repository at this point in the history
  • Loading branch information
hoodie committed Apr 29, 2024
1 parent 8684f69 commit 7de9acb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/date_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ impl TryFrom<(NaiveDateTime, &str)> for CalendarDateTime {
type Error = String;

fn try_from((dt, maybe_tz): (NaiveDateTime, &str)) -> Result<Self, Self::Error> {
let tzid: chrono_tz::Tz = maybe_tz.parse()?;
let tzid: chrono_tz::Tz = maybe_tz
.parse()
.map_err(|e: chrono_tz::ParseError| e.to_string())?;
Ok(CalendarDateTime::from((dt, tzid)))
}
}
Expand Down

0 comments on commit 7de9acb

Please sign in to comment.