diff options
| author | David Greenman <dg@FreeBSD.org> | 1995-08-28 10:54:34 +0000 |
|---|---|---|
| committer | David Greenman <dg@FreeBSD.org> | 1995-08-28 10:54:34 +0000 |
| commit | a6b18133c29d88eafdb87a940d41f4c25172f7da (patch) | |
| tree | 277627bad747da78a51c477953661cced34647b2 /gnu/usr.bin | |
| parent | f411ea8318d4133f0b56b2e2d738e7594ce12bb4 (diff) | |
Notes
Diffstat (limited to 'gnu/usr.bin')
| -rw-r--r-- | gnu/usr.bin/tar/list.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gnu/usr.bin/tar/list.c b/gnu/usr.bin/tar/list.c index 470fc6b7a6600..28e6ab316f1ff 100644 --- a/gnu/usr.bin/tar/list.c +++ b/gnu/usr.bin/tar/list.c @@ -558,11 +558,11 @@ void print_header () { char modes[11]; - char *timestamp; + char timestamp[80]; char uform[11], gform[11]; /* These hold formatted ints */ char *user, *group; char size[24]; /* Holds a formatted long or maj, min */ - time_t longie; /* To make ctime() call portable */ + time_t longie; int pad; char *name; extern long baserec; @@ -641,7 +641,7 @@ print_header () /* Timestamp */ longie = hstat.st_mtime; - timestamp = ctime (&longie); + strftime(timestamp, sizeof(timestamp), "%c", localtime(&longie)); timestamp[16] = '\0'; timestamp[24] = '\0'; |
