mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
deps: fix clippy warning for chrono
usage
This commit is contained in:
parent
af2833761c
commit
012bb7e3d8
1 changed files with 3 additions and 1 deletions
|
@ -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