From e36e1a113bb5015dd42ada3b9646dcf4b302791c Mon Sep 17 00:00:00 2001 From: Rick L Bird Date: Sat, 23 Apr 2011 02:13:11 -0400 Subject: [PATCH] Fixed display of created & modified in examine. --- src/strutil.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/strutil.c b/src/strutil.c index 271e202..d1d8ae0 100644 --- a/src/strutil.c +++ b/src/strutil.c @@ -1561,12 +1561,19 @@ char * show_tm(struct tm *when) { static char buffer[BUFFER_LEN]; + int p; if (!when) return NULL; - memset(buffer, '\0', BUFFER_LEN); - mush_strncpy(buffer, asctime(when), BUFFER_LEN); + strcpy(buffer, asctime(when)); + + p = strlen(buffer) - 1; + if (buffer[p] == '\n') + buffer[p] = '\0'; + + if (buffer[8] == ' ') + buffer[8] = '0'; return buffer; } -- 2.30.2