diff --git a/program/src/rrd_stat.c b/program/src/rrd_stat.c
index a7b1f33c10e368ba510bb8164a0062284a0653cc..4d3fc5f881d7469653e4027785c4a7dcb6a9ac58 100644 (file)
--- a/program/src/rrd_stat.c
+++ b/program/src/rrd_stat.c
/*****************************************************************************
- * RRDtool 1.1.x Copyright Tobias Oetiker, 1997 - 2002
+ * RRDtool 1.2rc2 Copyright by Tobi Oetiker, 1997-2005
*****************************************************************************
* rrd_stat Retreive the header part of an RRD
*****************************************************************************/
printf("\t<step> %lu </step> <!-- Seconds -->\n",rrd.stat_head->pdp_step);
#if HAVE_STRFTIME
strftime(somestring,200,"%Y-%m-%d %H:%M:%S %Z",
- localtime(&rrd.live_head->last_up));
+ localtime_r(&rrd.live_head->last_up, &tm));
#else
# error "Need strftime"
#endif
timer++;
#if HAVE_STRFTIME
- strftime(somestring,200,"%Y-%m-%d %H:%M:%S %Z", localtime(&now));
+ strftime(somestring,200,"%Y-%m-%d %H:%M:%S %Z", localtime_r(&now, &tm));
#else
# error "Need strftime"
#endif