From 7a418233e27a21d0177fbc7ac657e9fdf74a0a4a Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 15 Mar 1998 06:43:15 +0000 Subject: [PATCH] changed the date formatting (This used to be commit 57aa1db47cda9c625cd1ef742fece14d14590590) --- source3/web/statuspage.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/source3/web/statuspage.c b/source3/web/statuspage.c index 25a45928f2f..3ba46ff14f7 100644 --- a/source3/web/statuspage.c +++ b/source3/web/statuspage.c @@ -22,6 +22,14 @@ #include "includes.h" +static char *tstring(time_t t) +{ + static pstring buf; + pstrcpy(buf, asctime(LocalTime(&t))); + string_sub(buf," "," "); + return buf; +} + static void print_share_mode(share_mode_entry *e, char *fname) { printf("%d",e->pid); @@ -57,7 +65,7 @@ static void print_share_mode(share_mode_entry *e, char *fname) printf(""); printf("%s%s\n", - fname,asctime(LocalTime((time_t *)&e->time.tv_sec))); + fname,tstring(e->time.tv_sec)); } @@ -157,7 +165,7 @@ void status_page(void) printf("%d%s%s%s\n", crec.pid, crec.machine,crec.addr, - asctime(LocalTime(&crec.start)), + tstring(crec.start), crec.pid); } } @@ -179,7 +187,7 @@ void status_page(void) crec.name,uidtoname(crec.uid), gidtoname(crec.gid),crec.pid, crec.machine, - asctime(LocalTime(&crec.start))); + tstring(crec.start)); } } -- 2.11.4.GIT