Fixed display of created & modified in examine.
authorRick L Bird <nveid@yahoo.com>
Sat, 23 Apr 2011 06:13:11 +0000 (02:13 -0400)
committerRick L Bird <nveid@yahoo.com>
Sat, 23 Apr 2011 06:13:11 +0000 (02:13 -0400)
src/strutil.c

index 271e202967514a15e1beb5d44c939f77700ff346..d1d8ae05c3b18d1cafc4485e8f743fe25d1c70b4 100644 (file)
@@ -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;
 }