summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-28 17:21:41 -0400
committerGitHub <noreply@github.com>2024-04-28 17:21:41 -0400
commitae1de4de24ec2edbcb68daa618bb563e5659ed94 (patch)
tree5813cce76e4623d816fdf86dc3efe1f1d633885c
parent85cbea8dcb6ca5c4de7402373b6b83ba146ca682 (diff)
parent7e5d14b733a401934c7d8d6b340f809a794c5b43 (diff)
Merge pull request #1539 from tmccombs/fix-clippy
Fix deprecation warning.
-rw-r--r--src/filter/time.rs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/filter/time.rs b/src/filter/time.rs
index 4777f0f..a672594 100644
--- a/src/filter/time.rs
+++ b/src/filter/time.rs
@@ -1,4 +1,4 @@
-use chrono::{DateTime, Local, NaiveDate, NaiveDateTime, Utc};
+use chrono::{DateTime, Local, NaiveDate, NaiveDateTime};
use std::time::SystemTime;
@@ -33,10 +33,7 @@ impl TimeFilter {
})
.or_else(|| {
let timestamp_secs = s.strip_prefix('@')?.parse().ok()?;
- NaiveDateTime::from_timestamp_opt(timestamp_secs, 0)?
- .and_local_timezone(Utc)
- .latest()
- .map(Into::into)
+ DateTime::from_timestamp(timestamp_secs, 0).map(Into::into)
})
.map(|dt| dt.into())
})