mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-27 19:17:43 +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"))
|
||||
} else {
|
||||
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"));
|
||||
return Ok(());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue