From 470f3c4645acbf66296f92d267de536154d95fe1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ale=C5=A1=20K=C5=99enek?= Date: Wed, 3 Aug 2005 14:13:56 +0000 Subject: [PATCH] fix printing times --- org.glite.lb.client/examples/job_status.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/org.glite.lb.client/examples/job_status.c b/org.glite.lb.client/examples/job_status.c index e894065..696202d 100644 --- a/org.glite.lb.client/examples/job_status.c +++ b/org.glite.lb.client/examples/job_status.c @@ -233,9 +233,12 @@ static void printstat(edg_wll_JobStat stat, int level) printf("%sstateEnterTime : %ld.%06ld\n", ind, stat.stateEnterTime.tv_sec,stat.stateEnterTime.tv_usec); printf("%sstateEnterTimes : \n",ind); if (stat.stateEnterTimes) - for (i=1; i<=stat.stateEnterTimes[0]; i++) - printf("%s%14s %s", ind, edg_wll_StatToString(i-1), (stat.stateEnterTimes[i] == 0) ? - " - not available -\n" : ctime((time_t *) &stat.stateEnterTimes[i])); + for (i=1; i<=stat.stateEnterTimes[0]; i++) { + time_t st = stat.stateEnterTimes[i]; + + printf("%s%14s %s", ind, edg_wll_StatToString(i-1), st == 0 ? + " - not available -\n" : ctime(&st)); + } printf("%slastUpdateTime : %ld.%06ld\n", ind, stat.lastUpdateTime.tv_sec,stat.lastUpdateTime.tv_usec); printf("%sexpectUpdate : %d\n", ind, stat.expectUpdate); printf("%sexpectFrom : %s\n", ind, stat.expectFrom); -- 1.8.2.3