From ea4c09efd42d65ba39838eaa32906bebf3ddbad9 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Mon, 18 Jun 2007 20:01:08 +0200 Subject: [PATCH] date: added the width for the month field to the date format. Since glibc-2.6 Polish locale uses Roman numbers for months in dates. VIII is 4 bytes long, so %4b. Without this directory listings look ugly. It adds one space per line in the C locale. IMHO it is not a big problem. --- src/util/file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/file.c b/src/util/file.c index d44d83b0..3f9df6fe 100644 --- a/src/util/file.c +++ b/src/util/file.c @@ -464,9 +464,9 @@ stat_date(struct string *string, struct stat *stp) if (current_time > when + 6L * 30L * 24L * 60L * 60L || current_time < when - 60L * 60L) - fmt = "%b %e %Y"; + fmt = "%4b %e %Y"; else - fmt = "%b %e %H:%M"; + fmt = "%4b %e %H:%M"; add_date_to_string(string, fmt, &when); add_char_to_string(string, ' ');