mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +00:00
Merge pull request #4145 from niyaznigmatullin/chrono-0.4.23
build(deps): bump chrono from 0.4.22 to 0.4.23 + fix clippy warning
This commit is contained in:
commit
6f8fced8ed
7 changed files with 10 additions and 8 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
@ -233,9 +233,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "chrono"
|
name = "chrono"
|
||||||
version = "0.4.22"
|
version = "0.4.23"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1"
|
checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"iana-time-zone",
|
"iana-time-zone",
|
||||||
"num-integer",
|
"num-integer",
|
||||||
|
|
|
@ -384,7 +384,7 @@ yes = { optional=true, version="0.0.16", package="uu_yes", path="src/uu/yes
|
||||||
#pin_cc = { version="1.0.61, < 1.0.62", package="cc" } ## cc v1.0.62 has compiler errors for MinRustV v1.32.0, requires 1.34 (for `std::str::split_ascii_whitespace()`)
|
#pin_cc = { version="1.0.61, < 1.0.62", package="cc" } ## cc v1.0.62 has compiler errors for MinRustV v1.32.0, requires 1.34 (for `std::str::split_ascii_whitespace()`)
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
chrono = { version="^0.4.19", default-features=false, features=["std", "alloc", "clock"]}
|
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||||
conv = "0.3"
|
conv = "0.3"
|
||||||
filetime = "0.2"
|
filetime = "0.2"
|
||||||
glob = "0.3.0"
|
glob = "0.3.0"
|
||||||
|
|
|
@ -15,7 +15,7 @@ edition = "2021"
|
||||||
path = "src/date.rs"
|
path = "src/date.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { version="^0.4.19", default-features=false, features=["std", "alloc", "clock"]}
|
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||||
uucore = { version=">=0.0.16", package="uucore", path="../../uucore" }
|
uucore = { version=">=0.0.16", package="uucore", path="../../uucore" }
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ edition = "2021"
|
||||||
path = "src/du.rs"
|
path = "src/du.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { version="^0.4.19", default-features=false, features=["std", "alloc", "clock"]}
|
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||||
# For the --exclude & --exclude-from options
|
# For the --exclude & --exclude-from options
|
||||||
glob = "0.3.0"
|
glob = "0.3.0"
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||||
|
|
|
@ -15,7 +15,7 @@ edition = "2021"
|
||||||
path = "src/ls.rs"
|
path = "src/ls.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { version="^0.4.19", default-features=false, features=["std", "alloc", "clock"]}
|
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo", "env"] }
|
clap = { version = "4.0", features = ["wrap_help", "cargo", "env"] }
|
||||||
unicode-width = "0.1.8"
|
unicode-width = "0.1.8"
|
||||||
number_prefix = "0.4"
|
number_prefix = "0.4"
|
||||||
|
|
|
@ -15,7 +15,7 @@ edition = "2021"
|
||||||
path = "src/uptime.rs"
|
path = "src/uptime.rs"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = { version="^0.4.19", default-features=false, features=["std", "alloc", "clock"]}
|
chrono = { version="^0.4.23", default-features=false, features=["std", "alloc", "clock"]}
|
||||||
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
clap = { version = "4.0", features = ["wrap_help", "cargo"] }
|
||||||
uucore = { version=">=0.0.16", package="uucore", path="../../uucore", features=["libc", "utmpx"] }
|
uucore = { version=">=0.0.16", package="uucore", path="../../uucore", features=["libc", "utmpx"] }
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,9 @@ pub fn uumain(args: impl uucore::Args) -> UResult<()> {
|
||||||
Err(USimpleError::new(1, "could not retrieve system uptime"))
|
Err(USimpleError::new(1, "could not retrieve system uptime"))
|
||||||
} else {
|
} else {
|
||||||
if matches.get_flag(options::SINCE) {
|
if matches.get_flag(options::SINCE) {
|
||||||
let initial_date = Local.timestamp(Utc::now().timestamp() - uptime, 0);
|
let initial_date = Local
|
||||||
|
.timestamp_opt(Utc::now().timestamp() - uptime, 0)
|
||||||
|
.unwrap();
|
||||||
println!("{}", initial_date.format("%Y-%m-%d %H:%M:%S"));
|
println!("{}", initial_date.format("%Y-%m-%d %H:%M:%S"));
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue