Skip to content

Commit 101e03a

Browse files
committed
vmstat: replace uucore/custom-tz-fmt with jiff
because the feature no longer exists. And remove chrono.
1 parent ea7cd44 commit 101e03a

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

Cargo.lock

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ clap_mangen = "0.2.20"
6060
crossterm = "0.29.0"
6161
ctor = "0.5.0"
6262
dirs = "6.0.0"
63+
jiff = "0.2.15"
6364
libc = "0.2.154"
6465
nix = { version = "0.30", default-features = false, features = ["process"] }
6566
phf = "0.13.1"
@@ -84,6 +85,7 @@ xattr = "1.3.1"
8485
clap = { workspace = true }
8586
clap_complete = { workspace = true }
8687
clap_mangen = { workspace = true }
88+
jiff = { workspace = true }
8789
phf = { workspace = true }
8890
regex = { workspace = true }
8991
sysinfo = { workspace = true }

src/uu/vmstat/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ version.workspace = true
1212

1313
[dependencies]
1414
bytesize = { workspace = true }
15-
chrono = { workspace = true, default-features = false, features = ["clock"] }
1615
clap = { workspace = true }
16+
jiff = { workspace = true }
1717
terminal_size = { workspace = true }
1818
uucore = { workspace = true }
1919

src/uu/vmstat/src/picker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub fn get_pickers(matches: &ArgMatches) -> Vec<Picker> {
6969
pickers.push(concat_helper(
7070
(
7171
"-----timestamp-----".into(),
72-
format!("{:>19}", uucore::custom_tz_fmt::custom_time_format("%Z")),
72+
format!("{:>19}", jiff::Zoned::now().strftime("%Z").to_string()),
7373
),
7474
get_timestamp,
7575
));
@@ -471,6 +471,6 @@ fn get_timestamp(
471471
) -> Vec<(usize, String)> {
472472
vec![(
473473
10,
474-
chrono::Local::now().format("%Y-%m-%d %H:%M:%S").to_string(),
474+
jiff::Zoned::now().strftime("%Y-%m-%d %H:%M:%S").to_string(),
475475
)]
476476
}

0 commit comments

Comments
 (0)