This is a trivial change to allow a 5-digit-or-more year in 'ls' timestamp
output.

Signed-off-by: Kang-che Sung <explorer09-at-gmail.com>
---
 coreutils/ls.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/coreutils/ls.c b/coreutils/ls.c
index 1b63be5..7fd7264 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -585,8 +585,8 @@ static NOINLINE unsigned display_single(const struct
dnode *dn)
  if (age < 3600L * 24 * 365 / 2 && age > -15 * 60) {
  /* hh:mm if less than 6 months old */
  printf("%.5s ", filetime + 11);
- } else { /* year. buggy if year > 9999 ;) */
- printf(" %.4s ", filetime + 20);
+ } else { /* year */
+ printf("%5s ", filetime + 20);
  }
  column += 13;
  }
-- 
2.3.0
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to