projects
/
cobramush.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04740e9
)
Fixed display of created & modified in examine.
author
Rick L Bird
<nveid@yahoo.com>
Sat, 23 Apr 2011 06:13:11 +0000
(
02:13
-0400)
committer
Rick L Bird
<nveid@yahoo.com>
Sat, 23 Apr 2011 06:13:11 +0000
(
02:13
-0400)
src/strutil.c
patch
|
blob
|
history
diff --git
a/src/strutil.c
b/src/strutil.c
index 271e202967514a15e1beb5d44c939f77700ff346..d1d8ae05c3b18d1cafc4485e8f743fe25d1c70b4 100644
(file)
--- 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;
}