Skip to content

Commit

Permalink
Update Rust crate chrono to v0.4.29
Browse files Browse the repository at this point in the history
  • Loading branch information
Rustin170506 committed Sep 7, 2023
1 parent 75d6a89 commit baa9d1a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 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 @@ -41,7 +41,7 @@ bigdecimal = "=0.4.1"
crates_io_index = { path = "crates_io_index" }
crates_io_markdown = { path = "crates_io_markdown" }
crates_io_tarball = { path = "crates_io_tarball" }
chrono = { version = "=0.4.28", default-features = false, features = ["serde"] }
chrono = { version = "=0.4.29", default-features = false, features = ["serde"] }
clap = { version = "=4.4.2", features = ["derive", "env", "unicode", "wrap_help"] }
cookie = { version = "=0.17.0", features = ["secure"] }
crossbeam-channel = "=0.5.8"
Expand Down
5 changes: 3 additions & 2 deletions src/admin/render_readmes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::path::PathBuf;
use std::{io::Read, path::Path, sync::Arc, thread};

use crate::storage::Storage;
use chrono::{TimeZone, Utc};
use chrono::{NaiveDateTime, Utc};
use crates_io_markdown::text_to_html;
use crates_io_tarball::{Manifest, StringOrBool};
use diesel::prelude::*;
Expand Down Expand Up @@ -47,8 +47,9 @@ pub fn run(opts: Opts) -> anyhow::Result<()> {
let start_time = Utc::now();

let older_than = if let Some(ref time) = opts.older_than {
Utc.datetime_from_str(time, "%Y-%m-%d %H:%M:%S")
NaiveDateTime::parse_from_str(time, "%Y-%m-%d %H:%M:%S")
.expect("Could not parse --older-than argument as a time")
.and_utc()
} else {
start_time
};
Expand Down

0 comments on commit baa9d1a

Please sign in to comment.