diff --git a/src/widget/options.rs b/src/widget/options.rs index ea10c5d..373e175 100644 --- a/src/widget/options.rs +++ b/src/widget/options.rs @@ -1,7 +1,7 @@ use std::collections::HashMap; use std::hash::{Hash, Hasher}; -use chrono::NaiveDateTime; +use chrono::DateTime; use tui::buffer::Buffer; use tui::layout::{Alignment, Constraint, Direction, Layout, Rect}; use tui::style::Modifier; @@ -328,7 +328,7 @@ impl CachableWidget for OptionsWidget { .exp_dates .iter() .map(|d| { - let date = NaiveDateTime::from_timestamp_opt(*d, 0).unwrap().date(); + let date = DateTime::from_timestamp(*d, 0).unwrap().date_naive(); ListItem::new(Span::styled(date.format("%b-%d-%y").to_string(), style())) }) .collect::>();