diff --git a/Cargo.lock b/Cargo.lock index cabe5c2..5d69170 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1100,6 +1100,7 @@ dependencies = [ "clap_complete", "clap_mangen", "ctor", + "jiff", "libc", "phf", "phf_codegen", @@ -1867,8 +1868,8 @@ name = "uu_vmstat" version = "0.0.1" dependencies = [ "bytesize", - "chrono", "clap", + "jiff", "terminal_size", "uu_slabtop", "uucore", diff --git a/Cargo.toml b/Cargo.toml index 58361f1..ba53763 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,6 +60,7 @@ clap_mangen = "0.2.20" crossterm = "0.29.0" ctor = "0.5.0" dirs = "6.0.0" +jiff = "0.2.15" libc = "0.2.154" nix = { version = "0.30", default-features = false, features = ["process"] } phf = "0.13.1" @@ -84,6 +85,7 @@ xattr = "1.3.1" clap = { workspace = true } clap_complete = { workspace = true } clap_mangen = { workspace = true } +jiff = { workspace = true } phf = { workspace = true } regex = { workspace = true } sysinfo = { workspace = true } diff --git a/src/uu/vmstat/Cargo.toml b/src/uu/vmstat/Cargo.toml index 8360694..9415830 100644 --- a/src/uu/vmstat/Cargo.toml +++ b/src/uu/vmstat/Cargo.toml @@ -12,8 +12,8 @@ version.workspace = true [dependencies] bytesize = { workspace = true } -chrono = { workspace = true, default-features = false, features = ["clock"] } clap = { workspace = true } +jiff = { workspace = true } terminal_size = { workspace = true } uucore = { workspace = true } diff --git a/src/uu/vmstat/src/picker.rs b/src/uu/vmstat/src/picker.rs index 8f69cd4..b75c7ae 100644 --- a/src/uu/vmstat/src/picker.rs +++ b/src/uu/vmstat/src/picker.rs @@ -69,7 +69,7 @@ pub fn get_pickers(matches: &ArgMatches) -> Vec { pickers.push(concat_helper( ( "-----timestamp-----".into(), - format!("{:>19}", uucore::custom_tz_fmt::custom_time_format("%Z")), + format!("{:>19}", jiff::Zoned::now().strftime("%Z").to_string()), ), get_timestamp, )); @@ -471,6 +471,6 @@ fn get_timestamp( ) -> Vec<(usize, String)> { vec![( 10, - chrono::Local::now().format("%Y-%m-%d %H:%M:%S").to_string(), + jiff::Zoned::now().strftime("%Y-%m-%d %H:%M:%S").to_string(), )] }