Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jhspetersson committed Mar 6, 2024
1 parent 3b29935 commit 8155f25
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 34 deletions.
43 changes: 14 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ nu-ansi-term = "0.50"
rand = "0.8"
rbase64 = "2.0"
regex = "1.1"
rustyline = "13.0.0"
rustyline = "14.0.0"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
Expand Down
6 changes: 3 additions & 3 deletions src/searcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1753,9 +1753,9 @@ impl <'a> Searcher<'a> {
},
VariantType::DateTime => {
let (start, finish) = value.to_datetime();
let start = start.timestamp();
let finish = finish.timestamp();
let dt = field_value.to_datetime().0.timestamp();
let start = start.and_utc().timestamp();
let finish = finish.and_utc().timestamp();
let dt = field_value.to_datetime().0.and_utc().timestamp();
match op {
Op::Eeq => dt == start,
Op::Ene => dt != start,
Expand Down
2 changes: 1 addition & 1 deletion src/util/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn parse_datetime(s: &str) -> Result<(NaiveDateTime, NaiveDateTime), String>
}

if s == "yesterday" {
let date = Local::now().date_naive() - Duration::days(1);
let date = Local::now().date_naive() - Duration::try_days(1).unwrap();
let start = date.and_hms_opt(0, 0, 0).unwrap();
let finish = date.and_hms_opt(23, 59, 59).unwrap();

Expand Down

0 comments on commit 8155f25

Please sign in to comment.