Skip to content

Commit

Permalink
fix: cargo audit fix - drop chrono dependency [#47][#48]
Browse files Browse the repository at this point in the history
Closes #47
Closes #48
  • Loading branch information
mrl5 committed Apr 12, 2022
1 parent f90435a commit 2da3ced
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 29 deletions.
28 changes: 2 additions & 26 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 crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ tokio-stream = "0.1.8"
tokio-util = { version = "0.7.1", features = ["io"] }
atty = "0.2.14"
once_cell = "1.9.0"
chrono = "0.4.19"
reqwest = "0.11.9"
serde = "1.0.136"
confy = "0.4.0"
rayon = "1.5.1"
regex = "1.5.5"
time = "0.3.9"

[features]
4 changes: 2 additions & 2 deletions crates/cli/src/command/scan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
*/
use crate::conf::ApiKeys;
use crate::utils::{get_feed_path, get_memory_size};
use chrono::{Timelike, Utc};
use cpe_tag::package::Package;
use cpe_tag::query_builder::get_regex_pattern;
use cpe_tag::searchers::{contains_cpe_json_key, match_cpes, scrap_cpe};
Expand All @@ -24,6 +23,7 @@ use std::fs::{create_dir_all, read_dir, set_permissions, File, OpenOptions};
use std::io::{self, BufRead, Write};
use std::os::unix::fs::PermissionsExt;
use std::path::{Path, PathBuf};
use time::OffsetDateTime;

pub async fn execute(
feed_dir: PathBuf,
Expand All @@ -33,7 +33,7 @@ pub async fn execute(
api_keys: ApiKeys,
) -> Result<(), Box<dyn Error>> {
// todo: progress bar
let now = Utc::now();
let now = OffsetDateTime::now_utc();
let [date, time] = [
now.date().to_string(),
format!("{:02}:{:02}:{:02}Z", now.hour(), now.minute(), now.second()),
Expand Down

0 comments on commit 2da3ced

Please sign in to comment.