Replace ctime by strftime %c to use national representation

This commit is contained in:
Andrey A. Chernov 1995-08-08 03:07:15 +00:00
parent 22397ec3c3
commit 6de8ce1a74
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=9999

View File

@ -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';