Skip to content
Myr

Fix deprecation warning.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Thayne McCombs · committed by Thayne McCombs · parent 85cbea8 · Browse files · 1 file+2 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−5 removed

  • other:+2 added−5 removed

1 file+2 added−5 removed

modified:src/filter/time.rs+2 added-5 removed
1use chrono::{DateTime, Local, NaiveDate, NaiveDateTime, Utc};1use chrono::{DateTime, Local, NaiveDate, NaiveDateTime};23use std::time::SystemTime;45/// Filter based on time ranges.
26 unmodified lines
32 .latest()33 })34 .or_else(|| {35 let timestamp_secs = s.strip_prefix('@')?.parse().ok()?;36 NaiveDateTime::from_timestamp_opt(timestamp_secs, 0)?37 .and_local_timezone(Utc)38 .latest()39 .map(Into::into)36 DateTime::from_timestamp(timestamp_secs, 0).map(Into::into)37 })38 .map(|dt| dt.into())39 })40 }
130 unmodified lines