From 0987043a3cdb3ccdb9f5e846c11e44c0014ce530 Mon Sep 17 00:00:00 2001 From: alxndrv <44431221+alxndrv@users.noreply.github.com> Date: Sun, 23 Aug 2026 19:41:14 +0300 Subject: [PATCH] `hugetop`: replace `chrono` usage with `jiff` --- Cargo.lock | 2 +- src/uu/hugetop/Cargo.toml | 2 +- src/uu/hugetop/src/hugetop.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8ebcbc1e..8e0ebcf7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2486,8 +2486,8 @@ dependencies = [ name = "uu_hugetop" version = "0.0.1" dependencies = [ - "chrono", "clap", + "jiff", "tempfile", "uucore 0.7.0", ] diff --git a/src/uu/hugetop/Cargo.toml b/src/uu/hugetop/Cargo.toml index 983bfea8..c3365645 100644 --- a/src/uu/hugetop/Cargo.toml +++ b/src/uu/hugetop/Cargo.toml @@ -14,8 +14,8 @@ version.workspace = true workspace = true [dependencies] -chrono = { workspace = true } clap = { workspace = true } +jiff = { workspace = true } uucore = { workspace = true } [dev-dependencies] diff --git a/src/uu/hugetop/src/hugetop.rs b/src/uu/hugetop/src/hugetop.rs index 53c6fed1..06a9943b 100644 --- a/src/uu/hugetop/src/hugetop.rs +++ b/src/uu/hugetop/src/hugetop.rs @@ -3,8 +3,8 @@ // For the full copyright and license information, please view the LICENSE // file that was distributed with this source code. -use chrono::{DateTime, Local}; use clap::{value_parser, Arg, Command}; +use jiff::Timestamp; use std::collections::BTreeMap; use std::fs; use std::path::Path; @@ -123,8 +123,8 @@ pub fn uu_app() -> Command { } fn print_summary(numa: bool, human: bool) { - let now: DateTime = Local::now(); - println!("hugetop - {}", now.format("%a %b %e %T %Y")); + let now = Timestamp::now(); + println!("hugetop - {}", now.strftime("%a %b %e %T %Y")); let pools = match read_node_hugepage_pools() { Ok(nodes) if numa => {