diff options
Diffstat (limited to 'hack/hack.unix.c')
-rw-r--r-- | hack/hack.unix.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/hack/hack.unix.c b/hack/hack.unix.c index 0160c463..d640138d 100644 --- a/hack/hack.unix.c +++ b/hack/hack.unix.c @@ -1,4 +1,4 @@ -/* $NetBSD: hack.unix.c,v 1.5 1997/10/19 16:59:21 christos Exp $ */ +/* $NetBSD: hack.unix.c,v 1.6 1999/04/25 19:08:34 kristerw Exp $ */ /* * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. @@ -6,7 +6,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: hack.unix.c,v 1.5 1997/10/19 16:59:21 christos Exp $"); +__RCSID("$NetBSD: hack.unix.c,v 1.6 1999/04/25 19:08:34 kristerw Exp $"); #endif /* not lint */ /* This file collects some Unix dependencies; hack.pager.c contains some more */ @@ -64,12 +64,8 @@ getdate() static char datestr[7]; struct tm *lt = getlt(); - (void) sprintf(datestr, "%2d%2d%2d", - lt->tm_year, lt->tm_mon + 1, lt->tm_mday); - if (datestr[2] == ' ') - datestr[2] = '0'; - if (datestr[4] == ' ') - datestr[4] = '0'; + (void) sprintf(datestr, "%02d%02d%02d", + lt->tm_year % 100, lt->tm_mon + 1, lt->tm_mday); return (datestr); } |