From cf051af95246f28e5fa91d06d91950296f30de55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Ma=C5=82ysa?= Date: Sun, 22 Sep 2024 00:12:38 +0200 Subject: [PATCH] fix: Make ls and find show the year of mtime date Fixes #1239 --- src/commands/ls.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/ls.rs b/src/commands/ls.rs index ae79fdee1..a815c2379 100644 --- a/src/commands/ls.rs +++ b/src/commands/ls.rs @@ -164,7 +164,7 @@ impl LsCmd { /// * `path` - the path of the node pub fn print_node(node: &Node, path: &Path, numeric_uid_gid: bool) { println!( - "{:>10} {:>8} {:>8} {:>9} {:>12} {path:?} {}", + "{:>10} {:>8} {:>8} {:>9} {:>17} {path:?} {}", node.mode_str(), if numeric_uid_gid { node.meta.uid.map(|uid| uid.to_string()) @@ -181,7 +181,7 @@ pub fn print_node(node: &Node, path: &Path, numeric_uid_gid: bool) { node.meta.size, node.meta .mtime - .map(|t| t.format("%_d %b %H:%M").to_string()) + .map(|t| t.format("%_d %b %Y %H:%M").to_string()) .unwrap_or_else(|| "?".to_string()), node.link_str(), );