aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/cron
diff options
context:
space:
mode:
authorDaniel O'Callaghan <danny@FreeBSD.org>1999-01-16 01:51:03 +0000
committerDaniel O'Callaghan <danny@FreeBSD.org>1999-01-16 01:51:03 +0000
commitb9a1702cc2a674b5a4d663f207fe069c143f9606 (patch)
treed8aa20d39e0df5e6264b393e9f436dc45d4415d3 /usr.sbin/cron
parent86485cc940854f4ed192954630d75f683a0dd655 (diff)
Notes
Diffstat (limited to 'usr.sbin/cron')
-rw-r--r--usr.sbin/cron/lib/misc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr.sbin/cron/lib/misc.c b/usr.sbin/cron/lib/misc.c
index 6c098de1683b..3e0318268880 100644
--- a/usr.sbin/cron/lib/misc.c
+++ b/usr.sbin/cron/lib/misc.c
@@ -17,7 +17,7 @@
#if !defined(lint) && !defined(LINT)
static const char rcsid[] =
- "$Id: misc.c,v 1.5 1997/02/22 16:05:08 peter Exp $";
+ "$Id: misc.c,v 1.6 1997/09/15 06:39:25 charnier Exp $";
#endif
/* vix 26jan87 [RCS has the rest of the log]
@@ -619,9 +619,12 @@ arpadate(clock)
{
time_t t = clock ?*clock :time(0L);
struct tm *tm = localtime(&t);
- static char ret[30]; /* zone name might be >3 chars */
+ static char ret[32]; /* zone name might be >3 chars */
- (void) sprintf(ret, "%s, %2d %s %2d %02d:%02d:%02d %s",
+ if (tm->tm_year >= 100)
+ tm->tm_year += 1900;
+
+ (void) snprintf(ret, sizeof(ret), "%s, %2d %s %d %02d:%02d:%02d %s",
DowNames[tm->tm_wday],
tm->tm_mday,
MonthNames[tm->tm_mon],