Skip to content

Commit

Permalink
Fix outdated chrono warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
yonas committed Sep 16, 2024
1 parent c902b08 commit d0c58b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/widget/options.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -328,7 +328,7 @@ impl CachableWidget<OptionsState> 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::<Vec<_>>();
Expand Down

0 comments on commit d0c58b2

Please sign in to comment.