summaryrefslogtreecommitdiffstats
path: root/bin/ls/print.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1995-08-08 00:03:04 +0000
committerache <ache@FreeBSD.org>1995-08-08 00:03:04 +0000
commit36623ef62d5001916b6d1da837f2959dad09c73a (patch)
tree2e1ffef4b064698cba56e1f04b511fbf5fa045c3 /bin/ls/print.c
parent97b1928185ecb87b45ef960f34d4947a5846a746 (diff)
downloadFreeBSD-src-36623ef62d5001916b6d1da837f2959dad09c73a.zip
FreeBSD-src-36623ef62d5001916b6d1da837f2959dad09c73a.tar.gz
Change ctime to strftime %c to use national date/time representation
Diffstat (limited to 'bin/ls/print.c')
-rw-r--r--bin/ls/print.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ls/print.c b/bin/ls/print.c
index 03b9288..96ed41d 100644
--- a/bin/ls/print.c
+++ b/bin/ls/print.c
@@ -33,7 +33,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: print.c,v 1.4 1995/05/30 00:06:50 rgrimes Exp $
+ * $Id: print.c,v 1.5 1995/08/07 19:17:35 wollman Exp $
*/
#ifndef lint
@@ -227,9 +227,9 @@ printtime(ftime)
time_t ftime;
{
int i;
- char *longstring;
+ char longstring[80];
- longstring = ctime(&ftime);
+ strftime(longstring, sizeof(longstring), "%c", localtime(&ftime));
for (i = 4; i < 11; ++i)
(void)putchar(longstring[i]);
OpenPOWER on IntegriCloud