From: Rick L Bird Date: Sat, 23 Apr 2011 06:13:11 +0000 (-0400) Subject: Fixed display of created & modified in examine. X-Git-Url: https://git.theari.com/?a=commitdiff_plain;h=e36e1a113bb5015dd42ada3b9646dcf4b302791c;p=cobramush.git Fixed display of created & modified in examine. --- 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; }